Formatting an external USB drive using FAT32

If you will only ever use the drive on linux, there is no reason not to format it ext3. But if you hope to also connect it to a windows system, you may want to try a microsoft compatible filesystem.

I have an external USB enclosure with a 500G drive in it. Under linux, I figure out what name it is getting assigned by doing tail -f /var/log/messages when I plug in the USB cable. It turns out to be assigned /dev/sda (usually).

The drill then is to use fdisk to delete all existing patitions, then create one big one that fills the whole disk, give it type 0xb and mark it active. It goes like this:

fdisk /dev/sda
--delete all partitions
p - show what the current partition table is
n p 1 (make a new patition, primary, partition 1)
t b (give it type "b" for FAT32)
a 1 (make it active)
w
q
After this, one command does the rest:
mkdosfs -F32 /dev/sda1

Have any comments? Questions? Drop me a line!

Adventures in Computing / [email protected]