[sf-lug] how to use fdisk to repartition a 1TB USB hard drive? (jim) [sf-lug Digest, Vol 41, Issue 8]

Rick Moen rick at linuxmafia.com
Mon Jun 15 09:03:40 PDT 2009

Quoting jim (jim at well.com):

[much that we'll disregard as no longer relevant, because in the end you
overwrote the MBR.]

>    i took up the strategy "screw it" and used 
> dd if=/dev/zero of=/dev/sdb bs=512 count=1 
> and got the error message i've badly reported as 
> "some such". 

OK, so you ended up overwriting the boot area and the partition table 
with zeroes.

>    files are still there, drive is still variously 
> seen as 1TB vfat or ext3, and  ls -i  reports inode 
> numbers. 

Wait:  What say?  What exactly do you mean by "files are still there"?
What do you mean it's "seen as 1TB vfat or ext3"? 

You just got through overwriting the partition table with zeroes.
Although there might be filesystems on that disk, you just got through
saying you destroyed the partition table by which operating systems find
those partitions.

Part of the problem is that your account omits key _process_ details.
The one moment, you're overwriting the entire sector zero, and the next
you're running "ls -i" on filesystems on it -- but you didn't say what
you did in-between.  Like, wait, didn't you mount at least one
filesytem, first?  If so, (1) Shouldn't you have said so? And (2) didn't
a bell go off in the back of your head saying "Wait, I shouldn't have
been able to mount anything off this drive, because I just got through
overwriting its partition table with zeroes"?

Also, backing up a bit, I very distinctly said that I nowhere guaranteed
that the device was, at any given time, accessible as /dev/sdb at all;
that it was your responsibility to _determine_ how the kernel was
deciding to address this device, e.g., by reading the relevant lines of
"dmesg | more" where the kernel assigned it a device name.  With USB
mass-storage devices, the kernel uses the next available letter.  (Well,
with udev, it does whatever the script for that type of device

If you did that, you didn't mention having done so, with the result that
it's difficult for readers like me to know for certain what you were

If I might make a suggestion:  Take notes.  Contemporaneously.  If
you're going to seek technical help, ability to relate accurate details
matters, and having to fall back on language like "some such" is a bad
sign.  Also, as I like to say, assume techies are from Missouri, the
"Show Me" state:  Don't just tell us your interpretation of events, e.g.
"files are still there".  Instead, show us the raw data, e.g. selected
commands and return values.

More information about the sf-lug mailing list