/ˌɛm biː ˈɑːr/
noun — "first sector of a storage device containing boot information."
MBR, short for Master Boot Record, is the first sector of a storage device, such as a hard disk or solid-state drive, that contains essential information for bootstrapping an operating system and managing disk partitions. It occupies the first 512 bytes of the device and serves as a foundational structure for legacy BIOS-based systems, providing both executable boot code and a partition table.
Technically, the MBR is divided into three primary components:
- Boot Code: The first 446 bytes store executable machine code that the BIOS executes during system startup. This code locates an active partition and transfers control to its volume boot record, initiating the operating system boot process.
- Partition Table: The next 64 bytes contain up to four partition entries, each specifying the start sector, size, type, and bootable status of a partition. This defines the logical layout of the disk for the operating system and bootloader.
- Boot Signature: The final 2 bytes, usually 0x55AA, signal to the BIOS that the sector is a valid bootable MBR.
In workflow terms, when a BIOS-based computer powers on, the system firmware reads the MBR from the first sector of the storage device. The boot code executes, scans the partition table for the active partition, and jumps to the partition’s volume boot record. This process transfers control to the operating system loader, ultimately starting the OS.
A minimal illustration of an MBR structure:
+------------------------+
| Boot Code (446 bytes) |
+------------------------+
| Partition Table (64 B) |
| - Partition 1 |
| - Partition 2 |
| - Partition 3 |
| - Partition 4 |
+------------------------+
| Boot Signature (2 B) |
+------------------------+
The MBR has limitations, such as supporting only four primary partitions and disks up to 2 TB in size. Modern systems often use the GUID Partition Table to overcome these constraints, offering more partitions and larger disk support while retaining backward compatibility in some cases.
Conceptually, the MBR acts like a table of contents and starting key for a book: it tells the system where each chapter (partition) begins and provides the initial instructions to start reading (boot code), enabling the system to access and load the operating system efficiently.