The MBR Explained
The Master Boot Record (MBR) is a small, dedicated section at the beginning of the hard disk which holds the boot information and partition layout for the whole disk. The MBR itself is only a single physical sector in length (512 bytes), but it is required in order to create or maintain partitions on the disk, or even boot the computer. The following describes the different sections of a valid MBR, which helps to explain the importance of the MBR.
- Partition Table
- Boot Loader
- Disk Signature
- Magic Number
A disk partition is a logical division of the disk, into which a file system can be created in order to install an operating system (such as Windows or Linux), or store various types of files. The partition table effectively retains the particular details for each primary partition on the disk, such as starting position, size, type, status, etc. A standard MBR reserves space for up to four partitions, although only one is necessary for proper operation of the computer.
Most of the first 446 bytes of the disk are dedicated to telling the computer how to boot. When a machine first starts it needs to locate the necessary operating system files on the hard disk, so it turns to the boot loader for that information. The boot loader is actually a small program which identifies the active (bootable) partition, then redirects the boot process to that location. MBRWizard is able to repair the boot loader in case it gets overwritten or corrupted.
Located at byte 440, this is simply a unique identifier for the disk. This is typically used by Windows to remember the assigned drive letters for each partition, but is also used by various operating systems to identify the correct boot volume.
Located in the final two bytes of the MBR (511-512), this section must contain the hex value AA55, which officially classifies this as a valid MBR. An invalid magic number indicates a corrupt or missing MBR, therefore these bytes are critical to booting or using the disk.
Also, please keep in mind that the Magic Number is a hexadecimal number and is often represented as 0xAA55 or AA55h, but when viewed in a hex or disk editor it would be displayed as: "55 AA"
When any part of the MBR is missing or corrupt, the machine will not be able to boot. For example, if the partition table isn’t populated with correct partition information, not only will the boot loader be unable to locate the partition for booting, but the partition and all the contents (files) will effectively be lost. If the boot loader code becomes corrupt, the boot process cannot be properly handed off and the machine will not be able to boot.