Linux online course

GPT Partitions on Linux: GUID Partition Tables and Protective MBR

Learn how GPT partitions work on Linux, including capacity, partition numbering, protective MBR, UEFI and BIOS booting, compatibility, inspection, and safety.

GPT (GUID Partition Table) is the modern disk partition-table format used to describe how a storage device is divided into partitions. It is the usual choice for modern Linux installations and large disks, especially when the system boots with UEFI firmware.

This lesson explains GPT's structure, its differences from the older MBR format, boot requirements, Linux inspection tools, and safety considerations before changing a partition table.

What GPT Means

GPT stands for GUID Partition Table. A partition table is metadata that records where partitions begin and end, their intended roles, and other identifying information.

GPT is the modern alternative to the legacy MBR (Master Boot Record) partition-table format. GPT uses GUIDs, or Globally Unique Identifiers, to identify the disk, partition types, and individual partition instances.

Each GPT partition has at least two important identifiers:

  • Partition type GUID: identifies the intended role or category, such as an EFI System Partition or a Linux filesystem partition.
  • Partition unique GUID: identifies that particular partition instance and distinguishes it from other partitions.

A partition also has a numeric position, such as partition 1 or partition 12. The number is useful to Linux device names and tools, but it is not the only identity associated with the partition.

Why GPT Is Preferred for Large Disks

Traditional MBR partitioning uses 32-bit sector addresses. With common sector sizes, this creates an approximately 2 TiB practical addressing limit. The exact boundary depends on sector size and implementation details, but disks beyond this range are a major reason to choose GPT.

GPT uses 64-bit Logical Block Addressing (LBA). LBA assigns numbers to logical disk blocks, allowing GPT to describe much larger devices. Under the standard's 64-bit addressing model, GPT is commonly described as supporting up to about 8 ZiB, where a ZiB is a zebibyte.

This is a theoretical format limit, not a promise that every computer can use an 8-ZiB disk. Actual limits can be imposed by:

  • Firmware and boot-mode support
  • The operating system and its kernel
  • Storage drivers
  • Device-controller limits
  • Partitioning utilities and their versions
  • Filesystem limits

For ordinary Linux administration, the practical rule is simple: use GPT for modern systems and for disks larger than the MBR addressing range.

Partition Numbers and Entry Capacity

A typical GPT disk reserves space for 128 partition entries by default. This is not an absolute, built-in maximum. The GPT header records how many partition entries the entry array can contain, and that count can be configured when the table is created.

Partition numbers refer to entry positions in the GPT partition-entry array. They do not have to be consecutive. For example, after partitions are deleted, a disk might contain active partitions numbered 3, 12, and 99. The unused positions are gaps, not necessarily evidence of corruption.

Tools may reuse an available entry slot when creating a new partition, but administrators should not assume that partition numbers always increase without gaps. Validate the metadata if a tool reports an actual consistency error.

GPT On-Disk Layout

GPT stores its main metadata near both ends of the disk. The first logical sector contains a protective MBR, followed by the primary GPT metadata. A duplicate set of GPT metadata is stored near the end.

Disk regionPurposeNotes

Protective MBR — Provides limited compatibility with MBR-only software — Located in the first logical sector and is not the authoritative GPT map.

Primary GPT header — Describes the GPT layout, disk GUID, entry count, entry size, and locations of the arrays — Stored near the beginning of the disk.

Primary partition-entry array — Contains definitions for the GPT partitions — Appears after the primary header.

Usable partition area — Holds the actual partition contents — Partition boundaries are recorded in GPT entries.

Backup partition-entry array — Duplicate copy of the partition definitions — Stored near the end of the disk.

Backup GPT header — Duplicate GPT header — Stored in the final logical sector.

The primary and backup copies include checksums and provide a way to detect some forms of metadata damage. The duplicate metadata can also assist recovery when one copy is damaged. It is not a substitute for a backup of the data inside the partitions.

The Protective MBR

The first logical sector of a GPT disk contains a protective MBR. Older MBR-only programs may not understand GPT headers and partition-entry arrays. Without protection, such a program might conclude that the disk is empty and offer to create a new MBR layout over it.

The protective MBR normally contains one MBR partition entry that covers nearly the entire disk. Its type value is customarily 0xEE, the MBR type associated with GPT protection.

An MBR-only utility may therefore display one large unknown partition. That display is not the real GPT partition map. The authoritative layout is stored in the GPT header and GPT partition-entry arrays.

GPT Compared with MBR

CharacteristicGPTMBR

Typical disk-size capability — Supports disks beyond the approximately 2 TiB MBR addressing range and has a theoretical limit commonly expressed as about 8 ZiB — Traditional 32-bit sector addressing creates an approximately 2 TiB practical limit under common sector sizes.

Partition-entry capacity — Typically 128 entries by default; the count is recorded in the GPT header and can be configured — Four primary entries, or three primary entries plus one extended entry.

Need for extended/logical partitions — Does not use MBR extended and logical partitions in the same way; partitions are represented directly by GPT entries — Uses an extended partition and logical partitions as a workaround for the four-primary-entry limit.

Metadata copies and recovery — Primary and backup headers and entry arrays are stored near opposite ends of the disk — Main partition metadata is concentrated at the beginning, with less built-in duplication.

Partition identifiers — Uses a disk GUID, partition type GUIDs, and per-partition unique GUIDs — Primarily relies on numeric entries and legacy type codes.

UEFI boot suitability — The normal partition-table choice for UEFI systems — Legacy MBR is commonly supported by BIOS booting; UEFI systems may support MBR only in particular compatibility modes.

Legacy-system compatibility — Requires GPT-aware firmware, operating systems, bootloaders, or utilities — Broad support among older systems and utilities.

MBR's four-primary-partition limit led to the historical extended/logical partition scheme. An extended partition acts as a container for logical partitions. GPT does not need that workaround because its partition-entry array can hold many direct partition definitions.

Choosing GPT or MBR

Choose GPT when:

  • The disk is larger than the practical MBR addressing limit.
  • The computer uses UEFI firmware.
  • You want a modern layout with GUID identifiers and duplicated metadata.
  • You need more flexibility than four MBR primary entries provide.
  • The operating system, firmware, bootloader, and storage tools all support GPT.

Consider MBR when compatibility with a genuinely old operating system, firmware implementation, appliance, or partitioning utility is mandatory and the disk fits within MBR's practical limits.

Storage media shared with older equipment requires special care. A modern Linux system may read GPT correctly while an older appliance cannot. Check the capabilities of every system that must access the disk before choosing a format.

Booting Linux from GPT

UEFI with GPT

UEFI is the modern firmware interface commonly paired with GPT. UEFI boot files are stored in an EFI System Partition (ESP). The ESP is a dedicated FAT-formatted partition with the appropriate GPT partition type, and it contains bootloader files used by the firmware.

A typical UEFI Linux disk therefore has a GPT label, an ESP, and one or more Linux system or data partitions. The exact sizes and filesystem choices depend on the distribution and installation plan.

Legacy BIOS with GPT

BIOS booting from a GPT disk is possible, but it depends on the bootloader and firmware configuration. When GRUB is installed for legacy BIOS booting on GPT, a small BIOS Boot Partition may be required. This partition is normally unformatted and provides embedding space for GRUB.

A BIOS Boot Partition is different from an ESP. The ESP stores UEFI boot files in a FAT filesystem; the BIOS Boot Partition provides space for a BIOS-mode bootloader and is generally not mounted as a normal filesystem.

Firmware modePartition-table formatRequired special partitionBootloader consideration

UEFI with GPT — GPT — EFI System Partition — Install boot files in the FAT-formatted ESP and ensure the system is installed in UEFI mode.

Legacy BIOS with GPT — GPT — Usually a BIOS Boot Partition for GRUB — Configure and install a bootloader that supports BIOS booting from GPT.

Legacy BIOS with MBR — MBR — No GPT-specific special partition — Install a BIOS-compatible bootloader in the MBR or associated boot area.

Compatibility and Tool Versions

Older operating systems, firmware, bootloaders, and partitioning programs may lack GPT support or support only part of the format. Modern Linux versions of common tools generally support GPT, but support depends on the version installed in the environment.

GPT-capable Linux tools include:

  • parted: displays and modifies partition tables, including GPT.
  • gdisk: an interactive GPT partitioning utility.
  • sgdisk: a script-friendly GPT management and verification utility.
  • Current util-linux fdisk: can inspect and manage GPT on supported versions.

Always verify the versions and capabilities available on the target system. A tool that recognizes only MBR may show the protective MBR instead of the real GPT layout.

Inspecting GPT on Linux

Before changing a disk, identify the whole-disk device and inspect its partition-table type. Do not confuse a whole disk such as /dev/sdX with one of its partitions such as /dev/sdX1.

lsblk -o NAME,SIZE,PTTYPE,PARTTYPE,FSTYPE,PARTLABEL,MOUNTPOINTS

This command helps identify the intended device and displays the partition-table type in the PTTYPE column. A GPT disk normally reports gpt.

sudo fdisk -l /dev/sdX

Replace /dev/sdX with the correct whole-disk device. In the output, look for the disk label or partition-table type. Use a current util-linux version of fdisk.

sudo parted /dev/sdX print

Look for a line identifying a gpt disk label.

sudo sgdisk --print /dev/sdX && sudo sgdisk --verify /dev/sdX

sgdisk --print displays GPT information and partition entries. sgdisk --verify checks GPT metadata, including the relationship between the primary and backup structures. Run verification before and after repairs or significant changes.

Creating a GPT Disk Label

Creating a new GPT label is a destructive metadata operation. It replaces the existing partition-table information and can make current partitions inaccessible, even if the data sectors have not immediately been overwritten.

One noninteractive example is:

sudo parted -s /dev/sdX mklabel gpt

For interactive GPT management, use:

sudo gdisk /dev/sdX

Review the pending changes carefully inside the tool before choosing its write operation. Partitioning utilities usually do not provide a simple undo after metadata has been written.

Conversion and Data Safety

Changing a disk from MBR to GPT is not the same as creating a new empty GPT disk. A conversion may preserve existing partitions when the layout and available space meet the conversion tool's requirements, but it still changes critical disk metadata.

There are two broad approaches:

  • Non-destructive conversion: a specialized workflow attempts to retain existing partition boundaries and data while replacing the partition-table representation. It requires careful validation and may have layout-specific restrictions.
  • Repartitioning: the old table is removed and new GPT partitions are created. This is simpler for a new disk or a backed-up system, but existing partition contents may be lost or become inaccessible.

Before either approach:

  1. Back up important data to a separate, verified destination.
  2. Record the current partition layout, filesystems, mount points, and boot mode.
  3. Confirm that the operating system, firmware, and bootloader support the destination format.
  4. Use a GPT-aware tool and select the correct whole-disk device.
  5. Validate the resulting GPT metadata and test mounting or booting before treating the operation as complete.

Conversion alone does not solve boot compatibility. A system converted to GPT may still fail to boot if firmware is in the wrong mode, the ESP is missing for UEFI, the BIOS Boot Partition is missing for the selected GRUB configuration, or the bootloader was not installed for the active firmware mode.

Common Problems and Troubleshooting

An old utility shows one large unknown MBR partition

The utility is probably reading only the protective MBR. Use parted, gdisk, sgdisk, or a current fdisk. Do not remove the protective entry merely because the old utility does not understand it.

Partition numbers have gaps

Deleted GPT entries can leave unused slots. Active entries numbered 3, 12, and 99 can be normal. Use GPT verification tools to distinguish harmless numbering gaps from metadata errors.

Linux does not boot after installation

Check whether the machine is booting in UEFI or legacy BIOS mode. UEFI installations need an ESP. BIOS-mode GRUB installations on GPT may need a BIOS Boot Partition. The bootloader must also be installed for the firmware mode being used.

An older system cannot read the disk

The operating system, firmware, driver, or appliance may not support GPT. Check documented support and update the platform if possible. If interoperability is required and the device is within MBR limits, an MBR layout may be necessary.

Primary and backup GPT metadata disagree

Possible causes include damaged metadata, an incomplete disk clone, or a change in device size. Stop arbitrary partition changes, back up important data, inspect the disk with a GPT-aware verification tool, and repair only after determining which metadata copy is correct.

Existing partitions disappeared after creating a GPT label

The new label replaced the previous partition-table metadata. Do not write additional data to the disk. Restore from a backup or use an appropriate recovery procedure after identifying the original partition-table format.

Exam-Relevant Notes

  • GPT means GUID Partition Table and is the modern alternative to MBR.
  • GPT uses 64-bit LBA and is commonly described as supporting about 8 ZiB theoretically, while real systems impose smaller limits.
  • A typical GPT table provides 128 entries by default, but the entry count is configurable.
  • GPT partition numbers can have gaps; they are entry positions, not proof that numbering must be consecutive.
  • GPT stores a primary header and entry array near the beginning and backup copies near the end.
  • The protective MBR uses the customary 0xEE type and is for compatibility, not the authoritative partition map.
  • UEFI commonly boots GPT through a FAT-formatted EFI System Partition.
  • BIOS booting from GPT can work with a suitable bootloader and may require a BIOS Boot Partition for GRUB.
  • Creating or converting a partition table can make data inaccessible. Backups and device verification are mandatory.

Summary

GPT is the standard modern partition-table format for Linux systems that need large-disk support, many partition entries, GUID-based identification, and duplicated partition metadata. Its protective MBR helps prevent older software from overwriting the disk, but GPT-aware tools must be used to read the real layout.

For a new modern system, select GPT after confirming firmware and bootloader requirements. Inspect the whole disk first, understand whether the machine uses UEFI or BIOS, and verify GPT metadata after creating or repairing the table.