Master boot record (MBR)
The master boot record is the initial sector of a partitioned storage device that contains bootstrap code, the partition table and a signature; it has defined limits and is succeeded by GPT/UEFI in modern systems.
The master boot record (MBR) is a small but critical data structure located at the very beginning of a partitioned mass‑storage device such as a hard disk or removable drive. It occupies the first 512 bytes of the device and contains three principal elements: a tiny boot loader (bootstrap code), a partition table describing primary partitions, and a two‑byte boot signature. The MBR enables legacy BIOS firmware to start an operating system by loading and executing the bootstrap code.
Image gallery
2 ImagesStructure and characteristics
Typical MBR layout divides the 512 bytes into: a boot code area (commonly 446 bytes) that can launch a more elaborate second‑stage loader; a partition table with four 16‑byte entries describing primary partitions; and a 2‑byte boot signature (0x55AA) that signals a valid boot sector. Partition entries historically used CHS addressing and later LBA for sector offsets. Because the partition table is limited to four primary entries and the MBR uses 32‑bit fields for sector counts, the scheme imposes practical limits on partitioning and maximum disk size on systems that rely solely on MBR.
Role in the boot process
On BIOS‑based systems the firmware reads the MBR into memory and transfers control to its boot code. That code typically locates an active partition, loads the partition's volume boot record, and passes control to the installed operating system loader (for example, legacy DOS/Windows loaders or GRUB). On modern platforms that use UEFI and GUID Partition Table (GPT), MBR is often replaced or supplemented by a protective MBR to prevent older tools from misinterpreting the disk.
History, limitations and modern alternatives
MBR has been the standard partitioning method since early personal computing, but its limitations—chiefly the four‑entry partition table and addressing constraints tied to 32‑bit sector values—led to the development and adoption of GPT. GPT supports many more partitions and larger disks and is commonly used with UEFI firmware. For backward compatibility, a protective MBR can appear at the same location to signal that the disk uses GPT.
Risks, failures and recovery
Because the MBR must be intact for a system to boot, accidental overwrites, software installation errors, or malicious code can render a device unbootable. Historically, some viruses and destructive programs targeted boot records. Examples of notable boot‑related malware are documented in security literature, and some early viruses altered or erased boot sectors. Recovery methods include restoring a known‑good MBR from backup, using boot repair utilities provided by operating systems, or employing low‑level disk tools to reconstruct the partition table and boot code. Common utilities used for inspection and repair include disk management tools and recovery programs available across platforms.
Further reading and tools
- General information about storage devices: device overview
- BIOS and the handoff to the boot loader: BIOS details
- How an operating system uses the MBR to start booting: operating system boot
- Security incidents and malware targeting boot records: malware and boot sectors
- An historical example often cited in discussions of destructive software: CIH and related incidents
Understanding the MBR remains useful for low‑level disk administration, forensic analysis, and when working with older hardware or legacy operating systems. For new installations and large disks, GPT with UEFI is generally recommended due to improved flexibility and robustness.
Related articles
Author
AlegsaOnline.com Master boot record (MBR) Leandro Alegsa
URL: https://en.alegsaonline.com/art/62723