2003-02-05

Saving MBR information

I saw this note on the FreeDOS mailing list, and had to post it as a technote - how to save, restore, and refresh the master boot record. This is very valuable information, and may be useful to others:

Stewart Campbell (SCCB Solutions Pty Ltd) writes:

We are using FREEDOS to run temp 2GB partitions for testing programs. Once the testing programs are finished, a image of WIN XP or Win 2000 is then transferred to the machine as required by the client before shipping. We are finding that the bootloader that automatically installs with FDISK causes problems when the images are transferred. Is there anyway to create the partition without the bootloader or an easy way to remove it before re-imaging the systems?

Brian Reifsnyder (maintainer of FreeDOS FDISK) responds:

Yes, you can remove the bootloader with the /rmbr switch and leave the partition table intact.

Also, you may want to check out the /smbr and /ambr commands. The /smbr command saves the MBR to a boot.mbr file. This saved MBR then can be written back to any hard disk with the /ambr command. You could, for example, use Microsoft's fdisk /mbr command, save Microsoft's MBR, and use Free FDISK with the /ambr command to write Microsoft's mbr to a hard disk.

See the news.txt, history.txt, and fdisk /help screens for more information.