MBR

Also known as: Master Boot Record

On this page 8

The MBR, or Master Boot Record, is the first 512-byte sector of a storage device that contains a small piece of boot code, a partition table with four entries and a two-byte boot signature. In OS storage and in operating systems more broadly, it is the classic partitioning scheme introduced with IBM PC DOS 2.0 in 1983, and it remains in use on removable media, older computers and virtual machines that start through legacy BIOS firmware.

The MBR serves two roles at once: it tells the firmware how to start an operating system, and it tells the operating system where each disk partition begins and ends. Its compact design explains both its universal compatibility and its hard limits, above all the 2 TiB addressing ceiling that drove the move to GPT on modern systems.

How the MBR sector is structured

The MBR occupies logical block address 0, the very first sector of the disk, and its layout is fixed by long-standing convention rather than by a formal specification. Every byte has a defined purpose, which makes the sector easy to parse but leaves almost no room for extension.

The following table shows the classic layout of the 512-byte sector.

Offset (hex)SizeContent
0x000446 bytesBootstrap code area
0x1B84 bytesOptional disk signature used by Windows
0x1BE64 bytesPartition table, four entries of 16 bytes
0x1FE2 bytesBoot signature 0x55 0xAA
Layout of the classic MBR sector

Each 16-byte partition entry records a status byte (0x80 marks the active or bootable partition), a partition type code, start and end addresses in legacy CHS form and, most importantly, a 32-bit starting LBA and a 32-bit sector count. Current operating systems ignore the CHS values and rely on the LBA fields, because CHS cannot describe anything beyond roughly 8 GB.

The partition type code is a single byte that hints at the contents of a partition, for example 0x07 for NTFS or exFAT, 0x0C for FAT32 with LBA, 0x83 for a Linux file system and 0xEE for a protective MBR on a GPT disk. The code is advisory: the actual file system is identified by its own superblock or boot sector.

How MBR booting works on BIOS systems

On a legacy BIOS computer, the firmware reads sector 0 of the selected boot disk into memory at address 0x7C00, checks the 0x55AA signature and jumps to the first byte of the bootstrap code. Everything after that point is the responsibility of the code stored on the disk.

  1. The firmware performs its power-on self-test and selects a boot device.
  2. It loads the MBR and verifies the boot signature.
  3. The MBR bootstrap code scans the partition table for the active entry.
  4. It loads the first sector of that partition, the volume boot record.
  5. The volume boot record starts the operating system loader, such as Windows Boot Manager or GRUB.

Because 446 bytes are too small for a full boot loader, modern loaders use chain loading. GRUB, for instance, places its core image in the gap between the MBR and the first partition, which is why partitioning tools traditionally start the first partition at sector 2048, a 1 MiB offset. This alignment also suits SSDs and Advanced Format drives with 4 KiB physical sectors.

Primary, extended and logical partitions

The MBR partition table has room for only four primary partitions. To overcome this limit, one entry can be marked as an extended partition, a container that holds a linked chain of Extended Boot Records, each describing one logical partition.

The next table compares the three partition kinds that the MBR scheme supports.

Partition kindMaximum countBootable by classic MBR codeTypical use
Primary4, or 3 with an extended partitionYesSystem and boot volumes
Extended1No, it is only a containerHolds logical partitions
LogicalLimited by tools, often dozensNot directlyData, swap, extra Linux volumes
Partition kinds in the MBR scheme

The chained design works, but it is fragile: damage to a single Extended Boot Record can hide every logical partition after it in the chain. This is one of several reasons why administrators avoid complex layouts on MBR disks.

MBR compared with GPT

GPT, the GUID Partition Table, is the UEFI-era successor to the MBR and replaces nearly every limitation of the older scheme. The choice between them depends mainly on firmware mode, disk size and operating system support.

PropertyMBRGPT
Maximum disk size2 TiB with 512-byte sectorsAbout 9.4 ZB in theory
Partition count4 primary, more via extended128 by default in Windows
Address width32-bit LBA64-bit LBA
RedundancySingle copy, no checksumPrimary and backup header with CRC32
Firmware pairingLegacy BIOS or UEFI CSMUEFI, also BIOS with some loaders
Partition identityOne-byte type codeType and unique GUIDs, 36-character names
Key differences between MBR and GPT

The 2 TiB limit follows directly from the arithmetic: 2 to the power of 32 sectors multiplied by 512 bytes equals 2 TiB. Drives with 4 KiB logical sectors can stretch the MBR to 16 TiB, but firmware and operating system support for that configuration is inconsistent, so it is not a reliable workaround. Every GPT disk also carries a protective MBR in sector 0 so that older tools see the disk as occupied rather than empty.

When MBR is still the right choice

MBR remains appropriate wherever maximum compatibility matters more than capacity or resilience. Windows 11 requires UEFI and therefore a GPT system disk, so new desktop installations rarely use MBR for the boot drive.

SituationRecommended schemeReason
USB stick for cameras, TVs or car audioMBREmbedded devices often read only MBR
Older PC with BIOS firmware onlyMBRBIOS cannot boot Windows from GPT
Drive larger than 2 TiBGPTMBR cannot address the full capacity
Modern Windows, macOS or Linux system diskGPTUEFI and Secure Boot expect GPT
Legacy virtual machine imageMBRMatches the original BIOS configuration
Choosing a partitioning scheme by situation

Conversion is possible in both directions. Windows offers MBR2GPT for converting a system disk without data loss before switching the firmware to UEFI, while tools such as gdisk can convert data disks on Linux. A full backup before conversion is essential, because an interrupted rewrite of partition structures can make volumes inaccessible.

Limitations, risks and common mistakes

The single-copy design makes the MBR a single point of failure. Overwriting sector 0, whether by a faulty tool, a mistaken dd command or malware, removes both the boot code and the partition map, even though the partitions themselves remain intact on disk.

  • Bootkits historically replaced MBR code to load before the operating system; UEFI Secure Boot was designed partly to close this gap.
  • Installing a second operating system often overwrites the bootstrap code, leaving the first system unbootable until the loader is repaired.
  • Formatting a large disk as MBR silently leaves capacity beyond 2 TiB unusable.
  • Confusing the MBR with a volume boot record leads to repairing the wrong sector.

Recovery is usually straightforward when the cause is known. Commands such as bootrec /fixmbr in the Windows Recovery Environment rewrite the bootstrap code, while utilities like TestDisk can rebuild a lost partition table by scanning the disk for file system signatures.

Explained without jargon

Think of a disk as a large book. The MBR is the very first page, and it does two jobs. It contains a short note that tells the computer how to start reading, and it holds a tiny table of contents listing where each chapter, or partition, begins.

That first page is small, so it can list only four chapters directly and cannot describe a book bigger than about 2 terabytes. Newer computers use a larger, sturdier table of contents called GPT, but the MBR is still common on USB sticks and older machines because almost every device can read it.

A typical use case

A school IT technician needs to revive a ten-year-old desktop with BIOS-only firmware for a classroom running a lightweight Linux distribution. The machine has a new 500 GB SSD, well below the 2 TiB limit, so the technician creates an MBR partition table with a 1 MiB aligned start, a 480 GB primary ext4 partition marked active and an 8 GB primary swap partition.

The installer writes GRUB into the MBR bootstrap area and the gap before the first partition. On power-up, the BIOS reads sector 0, finds the 0x55AA signature and passes control to GRUB, which starts Linux in under 20 seconds. The same technician formats a set of 64 GB USB sticks with MBR and FAT32 so that classroom projectors and older televisions can play student presentations. The result is a working lab with no firmware upgrades and media that every device in the building recognizes.