External Hard Drive formatting

Kurt Granroth plug-discuss at granroth.org
Thu Jun 28 20:48:28 MST 2007


Harold Michels wrote:
> I have just purchased a 500GB Maxtor external USB HDD from Staples (On 
> sale at $129.00 plus tax through today).
> 
> The Linux pages told me it would plug in and run out of the box. It 
> does, sort of.
> It is being reported by my system (Fedora Core 6) as having been 
> formatted as NTFS.
[big snip]

Okay, the first thing to realize is that your external drive is pretty
much indistinguishable from your internal drives as far as any
filesystem or partitioning software goes.  If you are using a distro
like openSUSE then I *strongly* recommend using YaST to do all of this.
 It's all pointy-clicky and it's hard to screw things up.

If you're determined to do things by hand, then read on.

Your drive will mount via the SCSI drives and will show up as something
like /dev/sda1 or /dev/sdb1 or similar.  The drive, then, is /dev/sda
and the individual partition is /dev/sda1.

Step one is the repartition the drive.   Do you have data on the NTFS
side?  If not, then might as well just nuke it and start from scratch.
The warning in the fdisk man page about drive sides is a bit outdated.
Any modern Linux distro on a system with a modern BIOS can easily handle
a 500GB drive.

So fdisk /dev/sda (remember to do the drive, not the partition).  I
actually recommend using 'cfdisk' rather than fdisk since it's a tiny
bit more user friendly.  It's a personal choice, though.

parted works as well, especially if you do have data on the NTFS drive
and want to preserve it.  Just make sure that you run it as 'parted
/dev/sda' and not 'parted /dev/sda1'.  In a similar vein to cfdisk, I
recommend using qtparted instead of parted.  It has the same
functionality but wraps it in a very very easy to use GUI.

Once your partitions are created, you use the 'mkfs' tools to create the
filesystems on the partitions.  If you used fdisk, then you'll need to
recreate the NTFS partition using 'mkfs.ntfs'

/sbin/mkfs.ntfs /dev/sda1

To create the ext3 linux partition:

/sbin/mkfs.ext3 /dev/sda2


HTH
Kurt


More information about the PLUG-discuss mailing list