"McGee, Chris" wrote:
>
> Hallo-
> In the wake of a friend's recent LILO problems (plus that Chernobyl
> thing for the dual-booters amongst us, I suppose), I've got a couple
> questions regarding the preservation of a disks or md set's MBR.
>
> What is the proper way to preserve the master boot record for a
> single disk? Can I just dd the first 512k to a floppy? 512k is just a number
512bytes (AKA 1 sector) not k.
> I've heard; do different disks have differently-sized boot records and
> partition tables?
On the Intel platform, no. However some boot loaders may stick some data
after the first sector. Also the MBR DOES NOT cover the 'internal'
geometry of any logical partitions. The MBR can contain only 4 'primary'
partitions.
fdisk u, p to get the sector information of everythimg.
You can figure out the partition info using grep -x and other utils to
find
the location of the superblocks (for FAT, NTFS, HPFS, etc). I've even
had to rebuild FAT and HPFS superblocks by hand. None of this is much
fun at all.
If you get stuck like this, the best thing to do is to do a full 'dd'
copy to another drive before you start playing around.
> What is the proper way to preserve the mbr for a bootable stripe
> set?
For HW raid, just read it out. Linux software...I dunno good question. :
>
> Either way, if someone was to clean out your partition table with
>fdisk, or wipe out your boot sector with lilo, what sort of backup would you
>like to have on hand to recover quickly?
The first sector on the drive, and logical sector 0 of every partition
that
puts it's superblock there (ext2 is smart and doesn't), and an fdisk u,
p
all on a backup floppy. That's what I do.
md stuff would be this plus the RAID superblocks.