Appendix C: Master Boot Record Details
C.1 MBR Structure
The Master Boot Record (MBR) defined in Section 2.1 occupies the first sector of a device (we assume that the size of a sector is always 512 bytes). Its structure is shown in Table 3 below.
Table 3 - Structure of a Master Boot Record
C.2 Save and restore MBR
If you want to save a MBR, just copy the first sector of the first device in a file (keep a copy of that file on another media if you want to protect it from a device failure).
On Linux, type:
[xbas0:root] dd if=/dev/sda of=mbr.bin bs=512 count=1
If you want to restore the MBR replace the first sector with the saved file.
On Linux, type:
xbas0:root] dd if=mbr.bin of=/dev/sda bs=512 count=1
On Windows Server 2008, MBR can be restored even if not previously saved. Type:
C:\> bootrec /FixMbr