[sf-lug] how to use fdisk to repartition a 1TB USB hard drive?

Rick Moen rick at linuxmafia.com
Fri Jun 12 23:44:25 PDT 2009

Quoting jim (jim at well.com):

>    i got a new 1TB USB stand-alone hard drive with a vfat 
> file system and called itself "My Book". 
>    i figured i'd use fdisk to wipe the existing partition 
> table and make a new 100GB partition, leave the rest raw 
> and make new parts as i see the needs. 
>    i used fdisk, which showed four screwy partitions and 
> then told me the device didn't seem to have a valid 
> partition table, maybe i screwed up. 
>    i ignored fdisk's sarcasm and deleted the four screwy 
> partitions and then made a new 100GB partition. fdisk 
> seemed happy. 
>    partprobe didn't like things. 
>    i rebooted. and then... 
>            It still calls itself "My Book". I'd like to fix that 
>         along with other things. 

You know, if you want to start with a truly wiped disk format, just
write zeroes over the first 512 bytes:

#  dd if=/dev/zero /of=dev/sdb bs=512 count=1

Do that, and every aspect of filesystems, partition tables, volume
labels, etc. is just plain gone.

Now, as to your 1 TB drive, I'm pretty sure it's below the size where
/sbin/fdisk runs out of steam entirely, which I believe doesn't happen
until you try to create a filesystem larger than 1.5 TB, _but_ you
should, IMO, start thinking about using GNU parted instead of
/sbin/fdisk, and maybe also GPT-type partition tables instead of the
default IBM/Microsoft type.

(I have no direct experience, as I don't own any hard drives that big.)

Cheers,                      Notice:  The value of your Hofstadter's Constant 
Rick Moen                    (the average amount of time you spend each month 
rick at linuxmafia.com          thinking about Hofstadter's Constant) has just 
McQ!  (4x80)                 been adjusted upwards.

More information about the sf-lug mailing list