Old Schoold by Harri Kauhanen

Backing up Master Boot Record [Retro-PC series]

Before we start installing retro operating systems to our Retro-PC, it is more than wonderful idea to backup the Master Boot Record. Even if it is possible to install MS-DOS and Windows 98 so that your multi-boot does not disappear, Windows XP installation will override MBR sector no matter what, so we better be prepared.

There are many tools you can use for backing up and restoring MBR. It is also very easy with Linux utilities using dd command, and this is the method I used:

sudo dd if=/dev/sda of=/tmp/mbr_sda.bak bs=512 count=1

If you ever need (you probably do e.g. after Windows XP installation), boot to Linux (e.g. using Ubuntu installation CD) and type in:

sudo dd if=/path/to/mbr_sda.bak of=/dev/sda bs=512 count=1

If you do not want to override the partition table, you should reduce the number of bytes written (bs=446) to the boot sector (in our case we don’t want to use this).

Notice that it is also possible to recover your multi-boot menu even if you did not backup MBR. Therefore, this step is not critical per se, but I highly recommend doing the backup in any case. If something goes wrong, the restoration will be easier, and you know that you can restore exactly the same booting sequence with the setting you had before you tried installing MS-DOS, Windows 98 and Windows XP.