MBR (Master Boot Record)
In short: The MBR is the first sector (512 bytes) of a disk. It contains a small startup program and the partition table with up to four entries. It belongs to the old BIOS method.
In more detail: The BIOS loads this sector into memory and runs it. The program inside looks for the partition marked “active” and loads its boot sector, from which the actual bootloader starts.
In Depth
Structure of the 512 bytes:
| Bytes | Content |
|---|---|
| 0 – 445 | Boot code (446 bytes) |
| 446 – 509 | Partition table: 4 entries of 16 bytes |
| 510 – 511 | Signature 0x55AA (mark of a valid MBR) |
- Limits: Addresses are 32 bits wide, hence at most about 2 TiB per disk. Only four primary partitions. Whoever needs more creates an extended partition with logical drives.
- No protection: The boot code is not signed. Boot viruses and bootkits nest there. That is why Secure Boot and GPT are safer.
- Repair: In Windows
bootrec /fixmbr, in Linuxgrub-installorms-sys. Back up the table withdd if=/dev/sda of=mbr.bak bs=512 count=1. - Successor: GPT. Converting MBR to GPT is possible with
mbr2gpt. - Do not confuse: The volume boot record (VBR) is the boot sector of a single partition, the MBR that of the whole disk.
See also: GPT (GUID Partition Table), Legacy boot (BIOS mode), Partitions