How to delete all partitions for a complete reinstall
Alan Mckinnon
alan at linuxholdings.co.za
Wed Aug 16 17:01:28 UTC 2006
On Thu, 2006-08-17 at 00:36 +0800, ZHAO Keliang Kevin wrote:
> Hah, Thank you guys for the help and the discussion on the interesting
> dd issue. I learned dd before but hardly used it. Now you make me
> recall that it can fill MBR with 0s so easily.
>
> But does filling MBR with 0 mean that my harddisk becomes
> partition-less and other programs will be cheated and believed that
> there is nothing on the disk?
Yes. It means that there are no partitions defined on the disk anymore
so it doesn't _appear_ that there are no partitions, it means there
really are none anymore. The on-disk data is still there however so you
can make new partitions exactly the same size and order as they used to
be and all the data magically re-appears.
Except that filling the entire MBR with 0s will also remove the
bootloader stage 1 (446 bytes long) that's installed there, so the
machine will not be able to boot from that disk. To overwrite just the
partition table, you must overwrite just the 64 bytes starting at
position 446:
dd if=/dev/zero of=/dev/hda bs=1 count=64 skip=446
or something like that :-)
alan
More information about the ubuntu-users
mailing list