Wednesday, July 29, 2009

HOWTO: Formatting and partitioning your external usb hard drive in LINUX

Say the disk is at /dev/sdc (and not mounted)

sudo parted -i /dev/sdc
mklabel msdos
mkpart primary 0% 100% (makes 1 primary partition span entire disk)
mkfs 1 fat32 (puts a FAT32 filesystem on that partition)
quit
Then you should reformat the disk and check for bad blocks (unmount first if necessary)
sudo mkfs.vfat -c -L label -F 32 /dev/sdc1
note: label can be anything you want up to 11 characters, no spaces.
If you want to go nuts with the check, specify -c twice,
that will write/read 4 bit patterns to the entire drive, giving it a real workout.


or

mkfs.vfat /dev/sdc1

No comments: