What Contains Information On How Hard Drive Partitions Are Organized

5 min read

The Master Boot Record (MBR) and the GUID Partition Table (GPT) are the two primary data structures that contain information on how hard drive partitions are organized. These structures reside in the very first sectors of a storage device and act as the map the system firmware and operating system rely on to locate file systems, boot loaders, and logical volumes. Without a valid partition table, a drive appears as raw, unallocated space, rendering the data inaccessible to standard operating system tools.

Understanding the differences, limitations, and internal mechanics of MBR and GPT is essential for system administrators, data recovery specialists, and anyone managing storage infrastructure. This article provides a deep dive into these partitioning schemes, their on-disk layouts, and the critical metadata they store Simple, but easy to overlook. But it adds up..

The Master Boot Record (MBR): The Legacy Standard

Introduced with IBM PC DOS 2.It resides exclusively in the first physical sector (Sector 0) of the drive, often referred to as LBA 0 (Logical Block Addressing). 0 in 1983, the Master Boot Record has been the de facto standard for decades. This single 512-byte sector carries a heavy burden: it must contain the bootstrapping code, the partition table, and a validation signature.

MBR Structure Breakdown

The 512 bytes of the MBR are strictly partitioned into three functional areas:

  1. Bootstrap Code Area (Bytes 0–439): This 440-byte region holds the first-stage bootloader (e.g., GRUB stage 1, Windows MBR boot code). Its job is to scan the partition table for an active partition, load that partition's Volume Boot Record (VBR) into memory, and transfer execution to it.
  2. Partition Table Entries (Bytes 440–509): This 64-byte region contains exactly four entries, each 16 bytes long. This hard limit is the origin of the "four primary partitions" restriction. Each entry defines a partition using the following fields:
    • Boot Indicator (1 Byte): 0x80 marks the active (bootable) partition; 0x00 indicates inactive.
    • Starting CHS Address (3 Bytes): Cylinder-Head-Sector address for legacy BIOS compatibility (largely obsolete).
    • Partition Type ID (1 Byte): A hex code identifying the file system or partition role (e.g., 0x07 for NTFS/exFAT, 0x83 for Linux, 0xEE for GPT Protective).
    • Ending CHS Address (3 Bytes): Legacy geometry limit.
    • Starting LBA (4 Bytes): The absolute sector offset from the start of the disk (Little Endian).
    • Size in Sectors (4 Bytes): Total number of sectors in the partition.
  3. Magic Number / Signature (Bytes 510–511): The value 0x55AA. The BIOS/UEFI checks this to verify the sector is a valid MBR.

MBR Limitations

The 32-bit fields for Starting LBA and Size in Sectors impose a hard ceiling. With a standard 512-byte sector size, the maximum addressable space is $2^{32} \times 512 \text{ bytes} = 2 \text{ TiB}$. And drives larger than 2 TB cannot be fully utilized under MBR. What's more, the four-entry limit forces users to create an Extended Partition (a special container type 0x05, 0x0F, or 0x85) housing logical drives linked via a chain of Extended Boot Records (EBRs) scattered across the drive, adding complexity and fragility.

You'll probably want to bookmark this section.

GUID Partition Table (GPT): The Modern Standard

GPT was introduced as part of the UEFI (Unified Extensible Firmware Interface) specification to overcome MBR's architectural constraints. It uses Globally Unique Identifiers (GUIDs/UUIDs) for both partitions and the disk itself, providing a reliable, scalable, and redundant framework.

GPT On-Disk Layout

GPT does not rely on a single sector. It spans the beginning and end of the disk for redundancy.

  1. Protective MBR (LBA 0): To prevent legacy tools (which only understand MBR) from misinterpreting a GPT disk as empty or corrupted, LBA 0 contains a fake MBR. It defines a single partition of type 0xEE (GPT Protective) spanning the entire disk (or up to the 2 TiB limit). This signals: "This disk uses GPT; do not modify."
  2. Primary GPT Header (LBA 1): This block defines the disk's personality. Key fields include:
    • Signature: "EFI PART" (ASCII).
    • Revision: Usually 1.0 (0x00010000).
    • Header Size: Typically 92 bytes.
    • CRC32 Checksum: Of the header itself (with checksum field zeroed).
    • Current Disk GUID: Unique identifier for the physical disk.
    • Starting/Ending LBA of Usable Space: The range available for partitions.
    • Partition Entry Array Location: Usually LBA 2.
    • Number of Partition Entries: Typically 128 (allowing 128 primary partitions by default).
    • Size of Partition Entry: Usually 128 bytes.
    • CRC32 of Partition Array: Ensures the table integrity.
  3. Partition Entry Array (LBA 2–33 typically): An array of 128 entries (configurable), each 128 bytes. Each entry contains:
    • Partition Type GUID: Identifies the purpose (e.g., C12A7328-F81F-11D2-BA4B-00A0C93EC93B for EFI System Partition, EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 for Microsoft Basic Data).
    • Unique Partition GUID: Unique ID for this specific volume.
    • Starting LBA / Ending LBA (8 Bytes each): 64-bit addressing supports drives up to 9.4 Zettabytes (ZB) assuming 512-byte sectors.
    • Attributes: Bit flags (e.g., Bit 60 = Read-only, Bit 47 = No auto-mount).
    • Partition Name (72 Bytes): UTF-16LE string (up to 36 characters), allowing human-readable labels like "Windows OS" or "Data Volume".
  4. Backup GPT Header & Array (Last Sectors): A mirror copy of the Header and Partition Array resides at the end of the disk (LBA -1, -2, etc.). If the primary header is corrupted, the firmware or OS can recover using the backup. The backup header points back to the primary structures for cross-verification.

Critical Metadata Stored in Partition Tables

Regardless of the scheme (MBR or GPT), the partition table serves as the authoritative source for specific metadata categories. This information dictates how the block device is sliced into logical units.

1. Geometry and Boundaries

The most fundamental data is the Start Sector (LBA) and Size (Sector Count) Simple, but easy to overlook..

  • Alignment: Modern drives (Advanced Format 4Kn/512e) and SSDs require partitions to start on specific boundaries (typically 1 MiB / 2048 sectors) to align with physical erase blocks or 4KB physical sectors. The partition table records the result of this alignment decision. Misaligned partitions recorded in the table
Freshly Written

New Writing

People Also Read

Other Angles on This

Thank you for reading about What Contains Information On How Hard Drive Partitions Are Organized. We hope the information has been useful. Feel free to contact us if you have any questions. See you next time — don't forget to bookmark!
⌂ Back to Home