Master Boot Record (MBR)

Definition

It is a type of boot sector at the very beginning of partitioned computer mass storage devices like fixed disks or removable drives intended for use with IBM PC-compatible systems and beyond. The MBR holds the information on how the logical partitions, containing file systems, are organised on that medium. Additionally, it contains executable code to funcation as a loader of the installed operating system - usually by passing control to the loader's second stage or directly loading the OS itself.

the MBR is located in the first sector (Sector 0) of the storage device and is created when the disk is partitioned.

The MBR is crucial for the boot process in traditional BIOS systems. However, with the emergence of the Unified Extensible Firmware Interface (UEFI) in modern computers, the use of a different boot mechanism called the GUID Partition Table (GPT) has become more common.

Structure

  1. Bootstrap Code Area - This section contains the machine code for the initial boot loader. Its purpose is to identify the active partition and then load and execute the Volume Boot Record (VBR) of that partition, which in turn loads the OS. This code is limited to the size constraints of the record.
  2. Partition Table - Contains information on up to four primary partitions, indicating their start and end points, sizes and types. It also identifies which partition is active (bootable).
  3. Signature - End of MBR contains a static signature (55AAh) used for validation purposes to ensure that sector is indeeed a valide MBR.