Master Boot Record Save and Restore--Application Example
Summary: Here is an example of using getmbr.com
and restmbr.com. It involves saving a master boot record (MBR) before installing Linux LILO,
saving the Linux LILO MBR, and choosing between the original and LILO MBRs.
Suppose you wish to install Linux with the Linux Loader (LILO) program, but
are worried about LILO's reputation for trashing a hard disk's MBR. Here's
the scenario and workaround:
You start off with, for example, two primary bootable partitions, DOS and
Windows 95:
You would do this: Create a DOS boot floppy as instructed in the README file
(included in the .zip file), copy getmbr.com and restmbr.com to the
boot floppy, boot to the boot floppy and type "getmbr dos.mbr" (or whatever
filename you choose). Then install Linux with LILO:
Boot to the boot floppy and type "getmbr lilo.mbr". You will now have saved
two MBR files: the original and one for LILO.
Now you can boot to Linux okay, but find LILO has trouble with your previous
DOS and W95 partitions. So do this: boot to the boot floppy, and type
"restmbr dos.mbr". Your hard drive will look like this to the MBR:
You will be able to boot to DOS and W95, but the Linux partition, although
still present, will be invisible to the MBR. You can get back to Linux
by typing "restmbr lilo.mbr".
Warning! The MBR files you save are snapshots
of the disk as it existed at the time the MBR files were created.
You cannot delete, resize, or move partitions
and then restore some previous MBR and expect it to work properly!
In case you totally screw up the MBR and cannot do anything with the hard disk,
I have included "generic.mbr", which is a DOS MBR with no partitions defined.
Using the above example, the hard disk would look like this to getmbr.com or
restmbr.com:
If you install generic.mbr, you will have to use fdisk to redefine partitions.
You will, of course, lose previous partition information in the process.