Linux online course

MBR Disk Partitions in Linux

Learn how MBR partition tables work in Linux, including primary, extended, and logical partitions, numbering rules, capacity limits, and GPT guidance.

MBR means Master Boot Record. It is a traditional disk-partitioning format used widely on older x86 and x86-64 systems. An MBR disk stores boot-related information and its partition metadata near the beginning of the disk, in the first sector.

A partition table is disk metadata describing partition boundaries, partition types, and related attributes. The partition table is separate from the filesystem inside a partition: partitioning divides the disk, while formatting creates a filesystem such as ext4 or XFS in one of those regions.

How MBR Stores Partition Information

The first sector of an MBR disk contains the Master Boot Record. It traditionally includes boot code, four partition-table entries, and a boot-signature value. Each partition-table entry describes one partition or, in one special case, an extended-partition container.

The four entries are the central limitation of MBR partition organization. They are not four arbitrary partitions that can all be expanded indefinitely: each entry represents either an ordinary primary partition or the one extended partition allowed on the disk.

MBR Capacity Limitation

With conventional 512-byte sectors, MBR's addressing scheme supports approximately 2 TB of disk capacity. This is a limitation of the MBR partition format and its sector-addressing fields, not a limit imposed by Linux filesystems.

A filesystem might support a much larger volume, but it cannot use disk space that the partition table cannot address. For a disk larger than approximately 2 TB, GPT (GUID Partition Table) is generally the appropriate alternative, provided the system's firmware and boot requirements support it.

Primary Partitions

A primary partition is represented directly by one of the four entries in the MBR partition table. An MBR disk can have from zero through four primary partition entries.

Linux conventionally identifies primary entries with partition numbers 1 through 4. These numbers correspond to MBR table slots, not necessarily to every partition's physical order on the disk. A slot can remain unused, so primary numbering does not have to be continuous in every layout.

An extended partition also consumes one of these four entries. Therefore, a disk with an extended partition can have at most three ordinary primary partitions.

Four-primary example

Consider a disk with four ordinary primary partitions:

Partition 1   primary
Partition 2   primary
Partition 3   primary
Partition 4   primary

All four MBR entries are occupied. There is no remaining entry for an extended partition, so this layout cannot contain additional logical partitions.

Extended Partitions

An extended partition is a special kind of primary entry. It acts as a container for logical partitions rather than serving as an ordinary independent data partition in the usual sense.

Only one extended partition can exist on an MBR disk. Because it uses one of the four primary-table entries, the usual layout is up to three ordinary primary partitions plus one extended partition.

The extended container makes it possible to create more usable partitions after the four-entry limit of the primary table has been reached. The extended partition itself is identified by one of the primary numbers, commonly number 4, although the available slot depends on the layout.

Logical Partitions

A logical partition is created inside the extended partition. Logical partitions require an extended partition; they cannot exist independently on an MBR disk.

Linux assigns logical partition numbers beginning at 5. Thus, logical partitions are commonly named with suffixes such as 5, 6, and 7. This numbering rule is independent of the number of ordinary primary partitions and does not describe physical placement on the disk.

Primary plus extended example

Partition 1   primary
Partition 2   primary
Partition 3   primary
Partition 4   extended container
  Partition 5   logical
  Partition 6   logical
  Partition 7   logical

Here, partition 4 uses the fourth primary-table entry as the extended container. Partitions 5, 6, and 7 are logical partitions inside that container.

Minimal extended layout

A disk could have only one ordinary primary partition and one extended partition. If logical partitions are created inside the extended partition, their Linux numbers still begin at 5. Logical numbering does not begin at the next unused primary number.

MBR Partition Types

Partition typeWhere it existsMaximum count per diskLinux numberingPurpose
PrimaryDirectly in an MBR table entryFour entries total, including any extended entry1 through 4Ordinary partition represented directly by the table
ExtendedDirectly in one MBR table entryOne1 through 4Container that holds logical partitions
LogicalInside the extended partitionMultiple, subject to implementation and disk limits5 onwardAdditional usable partitions beyond the four direct entries

Valid MBR Layouts

LayoutOrdinary primary partitionsExtended partitionLogical partitionsTotal partitioning implication
Up to four primary partitionsZero through fourNoneNoneAll available entries are used directly by ordinary primary partitions
Up to three ordinary primary partitions plus one extended partitionZero through threeOneOptionalOne primary entry is used as a container, allowing additional logical partitions
An extended partition containing one or more logical partitionsZero through threeOneOne or moreLogical partitions are numbered from 5 and require the extended container

An extended partition cannot coexist with four ordinary primary partitions because the MBR table has only four entries. Four ordinary primary partitions consume every entry, leaving no entry to identify the extended container.

Primary partition numbers remain in the range 1 through 4 even when some slots are unused. Logical partition numbering begins at 5 because Linux reserves the lower numbers for the primary-table entries.

MBR and GPT Compared

GPT, or GUID Partition Table, is a newer partition-table format commonly used on modern systems. It is designed for large disks and supports many more partition entries than the traditional MBR arrangement.

CharacteristicMBRGPT
Partition-entry modelFour direct entries; one may be an extended container for logical partitionsMany partition entries are available directly without the MBR primary/extended distinction
Large-disk suitabilityApproximately 2 TB with conventional 512-byte sectorsSuitable for contemporary large disks and capacities beyond MBR's practical range
Typical use caseLegacy BIOS or operating-system compatibility requirementsModern systems, large drives, and contemporary firmware environments

Choose MBR when compatibility with older firmware, operating systems, or disk tools is a requirement. Choose GPT for contemporary systems or drives larger than MBR's practical capacity, after confirming that the system's firmware and boot configuration support GPT.

Troubleshooting MBR Layout Problems

No additional primary partition can be created

If a partitioning tool reports that no additional primary partition can be created, all four MBR primary-table entries are probably in use. Back up important data before changing the layout. Depending on the existing data and boot requirements, redesign the disk with an extended partition and logical partitions, or migrate to GPT.

A new partition is numbered 5 instead of 4

This normally means the new partition is logical and resides inside an extended partition. Logical partition numbering starts at 5 by design; the number does not indicate an error or necessarily reveal the partition's physical location.

A disk larger than 2 TB cannot be fully partitioned

The disk is likely reaching MBR's addressable-capacity limit under the conventional 512-byte-sector model. Use GPT when the hardware, firmware, operating system, and boot requirements permit it.

Logical partitions cannot be created

Logical partitions must be contained by an extended partition. Create an extended partition in an available primary-table slot, then create logical partitions within it. If all four slots already contain ordinary primary partitions, an extended partition cannot be added without changing the layout.

Key Points

  • MBR is a legacy partition-table format whose metadata is stored in the disk's first sector.
  • Its four partition-table entries support up to four ordinary primary partitions.
  • An extended partition uses one primary entry and acts as a container for logical partitions.
  • Only one extended partition is allowed on an MBR disk.
  • Linux numbers primary entries 1 through 4 and logical partitions from 5 onward.
  • With conventional 512-byte sectors, MBR has an approximate 2 TB capacity limit.
  • GPT is generally preferable for modern systems and disks beyond MBR's practical capacity.

For the modern alternative, see GPT Partitions. For broader Linux concepts, see Linux.