[raspberry-vi] Re: Formatting an external hard drive using raspberrypi

  • From: Tim Chase <raspberry-vi@xxxxxxxxxxxxxxxxx>
  • To: raspberry-vi@xxxxxxxxxxxxx
  • Date: Fri, 11 Aug 2017 08:17:26 -0500

I notice a couple issues.

1) your email says you're typing "disc" not "fdisk" or "cfdisk".

2) once you've partitioned your disk, you need to create a
file-system on it.

3) you say your extra disk is /dev/sda2 but that's likely the second
partition on your primary drive.  In all likelihood, it should
be /dev/sdb for the drive and /dev/sdb{partition number} (such
as /dev/sdb1) for the partitions on that drive.


Either "fdisk" (a simple menu-prompt) or "cfdisk" (a full-console
GUI/TUI interface) can be used to partition a disk. Traditionally,
partitioning uses "MBR" ("master boot record") format, but it has some
limitations (a maximum of 4 physical partitions and a few
logical/extended partitions, a maximum addressable drive size of
~2TB, are limited to 512-byte block-size, and lack of partition-table
redundancy).  To overcome these limits, there's been a recent
transition to using "GPT" ("GUID partition table"). However, GPT does
require an operating system that understands them.  Modern OSes do,
but if for some reason you need to use DOS or possibly old Windows,
they might not speak GPT.

That said, you plan to use/format the whole drive as one big
partition and it's less than 2TB, you can use MBR and it should work
in just about every OS.

If you plan to boot off the drive, don't forget to set the "boot"
flag on your boot partition.

Once you've partitioned the drive, you then need to put a file-system
on it.  If you want something universal that can be read just about
everywhere, you can use FAT/VFAT:

  # mkfs.vfat /dev/sdb1

If you want to have a smarter file-system and plan to only use it on
Linux, you can use ext2/ext3/ext4.  There are other more exotic
file-systems with added features (better performance with lots of
small files or with large files, robustness/mirroring/striping/RAID
functionality, etc) which you can experiment with, but for now I'd
stick to FAT or EXT.

Once you've got it formatted, you should be able to move it to
another machine mount it somewhere in your Pi:

  # mount /dev/sdb1 /media/

If you plan to use it on your Pi, you might want to add an entry in
your /etc/fstab so that it either auto-mounts on boot or knows
automatically where you want to mount it if you mount it manually.

Hopefully that wall of text helps. (grin)

-tim



On August  7, 2017, Leonhardt Bufler wrote:

Good morning,

I’d like to format an external hard drive using raspbian jessie
lite and mate, running orca. The location and name of the HDD is:
„/dev/sda2“. If I type: „disc“ followed by the path and name of the
HDD the formatting tool appears. The Parameters: „n“, „1“,“p“
aren’t working as expected but many somethings wrong …

Baby there is an completely different way to format the HDD instead?

I’d be really thankful if anyone could help me out here!

Thank’s a lot and sincerely,

Leonhardt=========================================================== 
The raspberry-vi mailing list 
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the
Raspberry Pi Foundation.

This list is not affiliated to the Raspberry Pi Foundation and the
views and attitudes expressed by the subscribers to this list do
not reflect those of the Foundation.

Mike Ray, list creator, January 2013

=========================================================== 
The raspberry-vi mailing list 
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry Pi 
Foundation.

This list is not affiliated to the Raspberry Pi Foundation and the views and 
attitudes expressed by the subscribers to this list do not reflect those of the 
Foundation.

Mike Ray, list creator, January 2013

Other related posts: