Formatting a disk
Antony Gelberg
antony at wayforth.co.uk
Thu Apr 13 16:35:21 UTC 2006
Daniel Carrera wrote:
> 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.
If you are using dd for this task, the disks have to be identical. That
is why dd is not good for this task. Think about what you are doing
here. I would invest time and energy in making one of the other
solutions work for you, although I haven't had time to read your post on
what you thought of the other solutions.
> 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.
More information about the ubuntu-users
mailing list