Hello,

Amos Shapira wrote:
> Another way I heard about (but haven't tried) is to dd(1) the first
> 512 bytes of the hard disk.  That way you have a copy of both the
> partition table and the boot sector.

Assuming you save a copy in advance...

Actually, LILO does half the job for you. If you install it on the MBR,
it will save a copy of the old MBR in /etc/boot.*. Of course, if /boot
is on the drive with the trashed partition table it won't help you much
-- unless /boot resides on the first partition. In the latter case, you
can just create a huge fictive partition and mount it. As long as it
includes whole of the original first partition, your file system will be
accessible (though you better mount it read-only). This worked for me
with ext2 and should, I believe, work for FAT variants as well.

Unfortunately, saving a copy of the MBR won't quite finish the job. The
partition data for logical partitions (that is, partitions that reside
inside an extended partition) is not stored in the MBR but at the
beginning of the extended partition. You'll need to back up that as
well. 

  Regards,
    Eran Tromer

Reply via email to