Master Boot Record (MBR) Save and Restore Instructions
Version 5.20, 2/2/2006.
Author: Greg Moler (sysop@allthatcounts.com)
Available at: http://www.allthatcounts.com/comp/mbr.htm
QUICK INSTRUCTIONS
A. Unzip the zip file and type seembr.com to display the MBR info.
B. Make a DOS boot floppy and put all the unzipped files on it.
C. Print out the readme files for reference.
D. You can run these programs from a hard disk, but you are advised
not to. If you screw up the MBR you may not be able to access
the hard drive to run the restore programs.
E. Although these programs may be run in a DOS shell of a protected-
mode operating system, the OS may interfere with the programs as
they perform low-level disk modifications. Again, for best results
run them from a DOS boot floppy.
F. If you have a very old BIOS, the ending free space may not be
displayed accurately. This has no effect on saving and restoring
the MBR--it just affects the display.
DETAILED INSTRUCTIONS
1. Make a DOS boot floppy.
Boot to DOS. If you do not have a hard disk with a DOS partition,
find someone who does or who has a DOS boot floppy. Go to the directory
which contains format.exe or format.com (probably \DOS or \BIN).
(If you run W9x, type Start, Shut Down, Restart the computer in
MS-DOS mode. After booting to DOS mode, cd\windows\command and proceed.
(Note: I believe later versions of Windows have reduced DOS capability (?)).
Put a floppy disk into the floppy drive and type "format a: /s/u".
Watch the formatting process on the screen: if there is any hesitation
or reports of bad sectors, throw away the floppy disk and start again with
another. A good boot floppy contains at a minimum the following files:
a. command.com (if it is not there, it is not a DOS boot floppy),
b. format.exe (or format.com),
c. fdisk.exe (or fdisk.com),
d. a text editor,
e. a cd-rom driver,
f. a mouse driver, and
g. autoexec.bat and config.sys to load the cd-rom driver
and/or the mouse driver if desired.
2. Unzip mbr520.zip to the boot floppy. You should have the following files:
a. getmbr.com -- saves MBRs and boot records (OS BRs)
from a hard disks to disk files,
b. restmbr.com -- restores MBRs from files to a hard disks,
c. seembr.com -- displays MBRs,
d. restosbr.com -- restores OS BRs from disk files to hard disks,
e. ncget.com -- text-only "no-confirm" version of getmbr.com,
f. ncrest.com -- text-only "no-confirm" version of restmbr.com,
g. ideget.com -- used to save disk managers from IDE hard drives,
h. iderest.com -- used to restore disk managers to IDE hard drives,
i. removedm.com -- used to remove disk managers from IDE hard drives,
j. list.com -- a DOS file viewer,
k. attr.com -- a utility to change attributes of files,
l. warmboot.com -- utility to warm boot the computer,
m. readme.1st -- quick list of files,
n. readme -- the main readme file,
o. readme.nc -- readme file for ncget.com and ncrest.com,
p. readme.dm -- readme file for ideget.com, iderest.com, and removedm.com,
q. generic.mbr -- a generic DOS MBR,
r. generic.prm -- parameter file for a generic MBR,
s. mbrerr.htm -- a list of error messages (an html file),
t. mbrapp.htm -- an application example (an html file),
u. systype.htm -- list of partition types recognized by getmbr.com
and restmbr.com (an html file), and
v. gif images used by mbrapp.htm.
3. Test getmbr.com:
a. Boot to the boot floppy.
b. Type "getmbr filename", where filename is the name
you choose for the MBR file to be storedy.
c. After the file has been successfully stored, type "list
filename" (using list.com, included in the zip file). When
the file comes up on the screen, hit alt-h to display the
the hex values. For a DOS-compatable MBR, you may see cryptic
messages on the right, such as "nvalid partition Setupt cannot
continue..." or "Invalid partition table Error loading..."
Scroll down to the bottom of the file.
Over at the bottom right you should see "55AA" which is the
MBR signature word. If you do not see the "55AA" (remember
in hex mode), please stop using the programs and report the
problem to: sysop@allthatcounts.com.
d. Restoring the MBR to a hard disk consists in typing "restmbr filename".
5. Tips:
a. WARNING! The MBR file you save is like a photograph of the
hard disk as it existed at the time you saved the file. You
cannot move, delete, or resize partitions after you have
saved an MBR file and expect the computer to work properly
after the previous MBR file is restored.
b. Give a descriptive name to the MBR file, such as "prelin.mbr" for
an MBR existing before a Linux installation, or "lilo.mbr", etc.
If you have two hard disks, for example the first one a Western
Digital and the second a Maxtor, you might name the first
"wd.mbr" and the second "maxtor.mbr".
c. Avoid using long file names for the MBR files. This is a DOS
program that uses filenames the 8.3 format.
d. If you are running Linux, consider avoiding the use of LILO.
Use loadlin.exe to boot Linux from a DOS or Windows partition or
DOS floppy. Loadlin.exe comes with Slackware (I don't know
about the other distributions).
e. Note that "Megs" shown on the color displays of getmbr.com,
restmbr.com, and seembr.com are binary-based: 1k = 1024 bytes,
1 megabyte is 1024x1024 = 1048576 bytes, etc.
f. If your BIOS supports a boot sector virus warning, this may
interfere with restmbr.com which writes to the MBR. You may
have to disable this feature to use the program.
g. If you screw up the hard disk format, you can start over by
installing a generic MBR: type "restmbr generic.mbr".
You then will have to use fdisk to partition the disk.
7. Partition Types.
a. The included html file, systype.htm, shows which partition
types getmbr and restmbr recognize.
b. The system i.d. is stored in one byte in the MBR sector. There are
therefore 255 possible partition types (00 is reserved for
"no partition defined"). Unfortunately, the partitions are
not unambiguously defined. For example, system i.d.= 07
reportedly may be HPFS, NTFS, Unix or QNX. I guess you can
blame IBM for not taking control of the situation. Anyway,
I do not go out to the partition boot records to try to
identify them, so that multiple partition types may be
listed by getmbr and restmbr. I have tried to put the most
likely types first.