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

Steve M Bibayoff bibayoff at gmail.com
Mon Jun 15 14:24:31 PDT 2009


On Sun, Jun 14, 2009 at 8:58 AM, jim<jim at well.com> wrote:
> many, many thanks. i'm holding my breath.

Well holding your breath didn't seem to help much from my end ;-) .
What I have is the 500 GB WD "My Book", but w/ USB 2, Firewire 400 and
eSata. I believe I initially partitioned it using the USB connector,
but I could be wrong(it may have been the firewire). Don't recall have
any problems at all.

iirc, this is what I did:
1) pluged it in, my system (Ubuntu 8.04) automounted it.
2) I backuped th contents on the drive just in case.
3) umounted drive.
4) fdisk /dev/sdb
5) mkfs.ext2 /dev/sdb1
6) remounted to see that everything worked

and that was it.

Some notes that may help.

1) Double check that you are using the correct device letter (and
interface, ie sdb, hda, etc). try plugging it in after your system
been up for awhile then plug it in and see what 'dmesg' outputs. I've
pasted mine below to give some reference(mines is listed as 'sdb').

2) make sure the filesystem on the USB disk isn't currently mounted
when using fdisk and mke2fs.

3) make sure your fdisk the device and not a partition, ie, /dev/sdb
and NOT /dev/sdb1 . And the device should NOT be mounted. Also,  fdisk
has problems w/ partitions(I believe it partitions and not devices)
over ~1.5 TB, but this shouldn't be a problem.

4) When you are using mke2fs, make sure it on the partition and NOT
the device. ie /dev/sdb1 and NOT /dev/sdb

5) I remember reading somewhere that 'dd' was being depreciated(or no
longer working properly) by the newer kernels. I can't find that
reference right now, but I do know I been have no luck in using dd on
cdrom/dvd's . this may be the problem w/ trying to wipe the partition

6) try using [g]parted, it doens't have that 1.5 TB problem, and has
more tools you can use (change partition table ID's, labels, etc).
just an idea.

7) as Tom said, you could also try e2label.

hth, some


paste of relevant dmesg output:

[ 5800.818657] usb 1-2: new high speed USB device using ehci_hcd and address 3
[ 5801.106588] usb 1-2: configuration #1 chosen from 1 choice
[ 5801.474555] usbcore: registered new interface driver libusual
[ 5801.425558] usbcore: registered new interface driver hiddev
[ 5801.536481] Initializing USB Mass Storage driver...
[ 5801.489445] input: Western Digital My Book as
[ 5801.498376] input,hidraw0: USB HID v1.11 Device [Western Digital My
Book] on usb-0000:00:02.1-2
[ 5801.498406] usbcore: registered new interface driver usbhid
[ 5801.498414] /build/buildd/linux-2.6.24/drivers/hid/usbhid/hid-core.c:
v2.6:USB HID core driver
[ 5801.616934] scsi6 : SCSI emulation for USB Mass Storage devices
[ 5801.617331] usbcore: registered new interface driver usb-storage
[ 5801.617337] USB Mass Storage support registered.
[ 5801.617794] usb-storage: device found at 3
[ 5801.617797] usb-storage: waiting for device to settle before scanning
[ 5805.774998] usb-storage: device scan complete
[ 5805.868917] scsi 6:0:0:0: Direct-Access     WD       My Book
  1028 PQ: 0 ANSI: 4
[ 5805.871032] sd 6:0:0:0: [sdb] 976773168 512-byte hardware sectors (500108 MB)
[ 5805.882427] sd 6:0:0:0: [sdb] Write Protect is off
[ 5805.882434] sd 6:0:0:0: [sdb] Mode Sense: 10 00 00 00
[ 5805.882437] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[ 5805.905041] sd 6:0:0:0: [sdb] 976773168 512-byte hardware sectors (500108 MB)
[ 5805.918156] sd 6:0:0:0: [sdb] Write Protect is off
[ 5805.918163] sd 6:0:0:0: [sdb] Mode Sense: 10 00 00 00
[ 5805.918166] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[ 5805.918174]  sdb: sdb1
[ 5805.919612] sd 6:0:0:0: [sdb] Attached SCSI disk
[ 5805.919658] sd 6:0:0:0: Attached scsi generic sg2 type 0
[ 5806.621586] kjournald starting.  Commit interval 5 seconds
[ 5806.553079] EXT3 FS on sdb1, internal journal
[ 5806.553089] EXT3-fs: mounted filesystem with ordered data mode.

More information about the sf-lug mailing list