Formatting a disk

Daniel Carrera daniel.carrera at zmsl.com
Thu Apr 13 15:55:33 UTC 2006


Antony Gelberg wrote:
> This /sounds like/ a hardware error to me and not necessarily a broken
> MBR.  However, who knows what happened at driver level?  You should be
> able to access the partition table whatever the MBR looks like.  They
> are two separate entities.

As far as I know, the the partition table is *part* of the MBR. The 
first few blocks of the MBR contain the boot loader and the rest contain 
the partition table.

> Are the two disks identical?

No. The second disk has fewer cylinders. But in general I can't demand 
that disks be identical. I'd like to find a solution that works for 
non-identical disks.

Requiring two disks to be identical is probably asking too much. 
Requiring them to be "almost identical" is a much less problematic 
requirement, but still not ideal. The ideal solution should only require 
the destination disk to be "large enough" for some definition of "large 
enough".

Here is another idea: I could use dd to copy only the first 440 bytes 
(instead of the first 512 bytes). It looks like the first 440 bytes 
contain the bootloader and the other 72 bytes contain the partition 
information.

 From Wikipedia:

Layout of Master Boot Record

  address function
|=====================================|
| 0x0000 Code Area (440 Bytes max.)   |
|=====================================|
| 0x01B8  4 byte disk serial number   |
|         2 bytes null (0)            |
|=====================================|
| 0x01BE 16 byte partition table entry|
|=====================================|
| 0x01CE 16 byte partition table entry|
|=====================================|
| 0x01DE 16 byte partition table entry|
|=====================================|
| 0x01EE 16 byte partition table entry|
|=====================================|
| 0x01FE 2 byte MBR signature (0xAA55)|
|=====================================|


If I can just manage to rescue this disk again I'll try that and see 
what happens.

Cheers,
Daniel.
-- 
      /\/`) http://opendocumentfellowship.org
     /\/_/
    /\/_/   A life? Sounds great!
    \/_/    Do you know where I could download one?
    /




More information about the ubuntu-users mailing list