| |

LFCS 73 ๐Ÿง Partitioning โ€” Concepts

โฑ๏ธ Estimated read: 11 min | |

Partitioning is the act of dividing a physical disk into logical regions that the operating system treats as separate block devices. Every filesystem, swap area, and LVM physical volume begins as a partition or a whole disk. The LFCS objective is not about memorizing the fdisk menu; it is about understanding the two partition table formatsโ€”MBR and GPTโ€”and the constraints each imposes on disk size, partition count, and boot compatibility. A disk partitioned with the wrong table type for its intended role will fail to boot or fail to use the available capacity, and the failure mode is not always obvious.

Key point: MBR is limited to 2 TB and four primary partitions. GPT has no practical size limit and supports 128 partitions by default, all of which are primary. The partition table type is determined at the moment the table is written, and changing it destroys the existing partition layout.


Why partitioning concepts matter

The boot compatibility problem. A system with legacy BIOS requires a boot disk formatted with MBR. A system with UEFI requires a boot disk formatted with GPT . Using the wrong combination produces a disk that the firmware cannot boot, even if the partitions and filesystems are otherwise correct. The partition table type is not a preference; it is a compatibility requirement determined by the firmware.

The capacity problem. MBR stores partition offsets as 32-bit sector counts. With 512-byte sectors, this caps the addressable space at 2 TB . A 4 TB disk partitioned with MBR can only use the first 2 TB. GPT uses 64-bit block addresses, which removes the practical limit . On modern hardware, MBR is a liability unless the disk is small or the system requires legacy BIOS compatibility.

The partition count problem. MBR’s partition table has room for four entries. These are the primary partitions. To create more than four, one primary partition must be designated as an extended partition, which contains a linked list of logical partitions numbered from 5 onward . GPT does not have this distinction. All GPT partitions are primary, and the default limit is 128 .

The tool selection problem. fdisk historically handled MBR and did not understand GPT. gdisk was created as the GPT-aware counterpart with an almost identical interface . Modern fdisk handles both, and parted handles both with a different commit modelโ€”changes are applied immediately rather than staged until w . The tool choice affects the risk of accidental changes, not the capabilities.


a. MBR: Primary, Extended, and Logical Partitions

The MBR partition table occupies the first sector of the disk. It contains four 16-byte entries, each describing a primary partition. The partition numbers 1 through 4 correspond to these entries, whether or not the partitions exist . A disk with two primary partitions has entries for partitions 1 and 2 populated and entries for 3 and 4 empty.

If more than four partitions are needed, one primary entry is used for an extended partition. The extended partition is not a data partition. It is a container whose first sector holds another partition table with entries for logical partitions. The logical partitions are numbered starting at 5, and each logical partition’s descriptor points to the next, forming a chain . The extended partition itself has a type ID of 5 (or f for LBA), and the logical partitions typically have type 83 for Linux native or 82 for Linux swap .

# Example MBR layout with one extended partition
# /dev/sdb1  primary   (data)
# /dev/sdb2  primary   (data)
# /dev/sdb3  extended  (container, not usable for data)
# /dev/sdb5  logical   (data, inside sdb3)
# /dev/sdb6  logical   (data, inside sdb3)

The practical consequence is that an MBR disk with an extended partition sacrifices one of the four primary slots to the container. The maximum number of usable partitions is four if no extended partition is used, or three primaries plus an arbitrary number of logical partitions (subject to kernel limits) if it is.


b. GPT: Uniform Partitions and Protective MBR

GPT replaces the MBR partition table with a GUID Partition Table. The table is larger and stores partition entries with 64-bit LBA addresses, GUIDs, and names. The default limit in most tools is 128 partitions, all treated as primary . There is no extended partition, no logical partition chain, and no four-entry limit.

GPT also includes a protective MBR in the first sector. This is a legacy compatibility measure: it occupies the space where an MBR table would be and marks the disk as GPT, preventing older MBR-only tools from misinterpreting the GPT disk and overwriting it . The protective MBR does not contain a real partition table, and it does not impose MBR constraints on the GPT layout.

# GPT layout with four partitions
# /dev/sdb1  primary
# /dev/sdb2  primary
# /dev/sdb3  primary
# /dev/sdb4  primary
# All are primary; there is no extended or logical distinction.

The boot compatibility rule is that UEFI requires GPT for the boot disk, and legacy BIOS requires MBR for the boot disk. A non-boot data disk can use GPT on a legacy BIOS system, because the firmware does not need to read the partition table to boot from it .


c. Partition Types and Swap

Each partition has a type ID that tells the operating system what the partition is intended for. In MBR, the type ID is a hex value stored in the partition entry. 83 is Linux native, 82 is Linux swap, 5 or f is extended . In GPT, the type is a GUID. The concept is the same: the type is a hint to the OS and to tools, not an enforced constraint. A partition with type 83 can be formatted as ext4, XFS, or anything else; the type ID does not prevent it.

Swap space is a dedicated partition or file used when physical memory is full. The Red Hat documentation recommends a dedicated swap partition over a swap file, and provides size guidelines based on RAM and whether hibernation is needed . For a system with 2 GB of RAM, the recommendation is 2ร— RAM for swap, or 3ร— if hibernation is allowed. For systems with more than 64 GB of RAM, hibernation is not recommended, and at least 4 GB of swap is sufficient . These are guidelines, not requirements. The exam may test the ability to create a swap partition and activate it with mkswap and swapon.


Complete Example Session

# ============================================
# PART 1: IDENTIFY THE DISK AND ITS TABLE TYPE
# ============================================
# List block devices in tree format
lsblk

# Check the partition table type
lsblk -o NAME,PTTYPE,SIZE /dev/sdb
# PTTYPE column shows "dos" for MBR or "gpt" for GPT


# ============================================
# PART 2: INSPECT AN MBR DISK WITH FDISK
# ============================================
sudo fdisk -l /dev/sdb
# Output shows "Disklabel type: dos"
# Lists primary partitions 1-4 and any logical partitions from 5


# ============================================
# PART 3: CREATE AN MBR PARTITION TABLE
# ============================================
sudo fdisk /dev/sdb
# At the fdisk prompt:
# o    โ†’ create a new empty DOS (MBR) partition table
# n    โ†’ new partition
# p    โ†’ primary
# 1    โ†’ partition number
# <Enter> โ†’ default first sector
# +2G  โ†’ size
# w    โ†’ write and exit


# ============================================
# PART 4: CREATE AN EXTENDED PARTITION
# ============================================
sudo fdisk /dev/sdb
# n    โ†’ new partition
# e    โ†’ extended
# 2    โ†’ partition number (if 2 is free)
# <Enter> โ†’ default start
# <Enter> โ†’ default end (use remaining space)
# w    โ†’ write


# ============================================
# PART 5: CREATE LOGICAL PARTITIONS
# ============================================
sudo fdisk /dev/sdb
# n    โ†’ new partition
# l    โ†’ logical (fdisk defaults to logical inside extended)
# <Enter> โ†’ default start
# +1G  โ†’ size
# w    โ†’ write
# Repeat for sdb6, sdb7 as needed


# ============================================
# PART 6: INSPECT A GPT DISK WITH GDISK
# ============================================
sudo gdisk -l /dev/sdc
# Output shows "GPT: present"
# Lists partitions 1-128, all primary


# ============================================
# PART 7: CREATE A GPT PARTITION TABLE
# ============================================
sudo gdisk /dev/sdc
# o    โ†’ create a new empty GPT
# n    โ†’ new partition
# 1    โ†’ partition number
# <Enter> โ†’ default first sector
# <Enter> โ†’ default last sector
# 8300 โ†’ Linux filesystem type code
# w    โ†’ write


# ============================================
# PART 8: SET PARTITION TYPE FOR SWAP (MBR)
# ============================================
sudo fdisk /dev/sdb
# t    โ†’ change partition type
# 5    โ†’ partition number
# 82   โ†’ Linux swap type ID
# w    โ†’ write


# ============================================
# PART 9: REFRESH THE KERNEL PARTITION TABLE
# ============================================
sudo partprobe /dev/sdb
# Re-reads the partition table without a reboot


# ============================================
# PART 10: VERIFY THE LAYOUT
# ============================================
lsblk /dev/sdb
# Shows the partition tree with sizes and mount points

The ten parts trace the inspection and creation of both table types. Parts 3 through 5 show the MBR primary/extended/logical sequence. Parts 6 and 7 show the GPT equivalent, where all partitions are primary.


Quick Reference

MBR vs. GPT

AspectMBRGPT
Maximum disk size2 TBNo practical limit
Primary partitions4128 (default)
Extended/logicalYes, beyond 4No
Boot compatibilityLegacy BIOSUEFI
Protective MBRN/APresent in first sector
Toolfdiskgdisk, parted, modern fdisk

MBR Partition Types

IDMeaning
83Linux native
82Linux swap
5 or fExtended partition
8eLinux LVM

Partition Numbering (MBR)

NumberType
1โ€“4Primary or extended
5+Logical (inside extended)

Best Practices

โœ… Do This:

# Check the existing table type before modifying
lsblk -o NAME,PTTYPE,SIZE /dev/sdX                                      # โœ…
# Use gdisk or parted for GPT disks
sudo gdisk /dev/sdX                                                     # โœ…
# Refresh the kernel table after changes
sudo partprobe /dev/sdX                                                 # โœ…
# Use a dedicated swap partition
sudo mkswap /dev/sdX1 && sudo swapon /dev/sdX1                          # โœ…

โŒ Don’t Do This:

# Use MBR on a disk larger than 2 TB
# Space beyond 2 TB is unusable                                          # โŒ
# Use MBR for a UEFI boot disk
# Firmware cannot boot from it                                          # โŒ
# Assume logical partitions can be used for boot
# Logical partitions are often not bootable                              # โŒ
# Change the partition table without verifying the target disk
# Irreversible data loss on the wrong device                             # โŒ

Common Pitfalls

PitfallWhy It HappensFix
Disk larger than 2 TB shows only 2 TBMBR tableUse GPT
Cannot create fifth partitionMBR four-primary limitCreate extended partition, use logical
UEFI system does not bootMBR boot diskReformat boot disk with GPT
fdisk does not recognize GPTOld fdisk versionUse gdisk or parted
Kernel does not see new partitionsTable not re-readpartprobe /dev/sdX

Real-World Examples

1. Check Table Type

lsblk -o NAME,PTTYPE /dev/sdb

2. List MBR Partitions

sudo fdisk -l /dev/sdb

3. List GPT Partitions

sudo gdisk -l /dev/sdc

4. Create MBR Table

sudo fdisk /dev/sdb
# o, w

5. Create GPT Table

sudo gdisk /dev/sdc
# o, w

6. Create Extended Partition

sudo fdisk /dev/sdb
# n, e, <Enter>, <Enter>, w

7. Create Logical Partition

sudo fdisk /dev/sdb
# n, l, <Enter>, +1G, w

8. Set Swap Type

sudo fdisk /dev/sdb
# t, 5, 82, w

9. Refresh Kernel Table

sudo partprobe /dev/sdb

10. Format Swap

sudo mkswap /dev/sdb5
sudo swapon /dev/sdb5

Visual

MBR Partition Table Structure

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  MBR (Sector 0)                                              โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”โ”‚
โ”‚  โ”‚ Partition 1 entry (primary or extended)                 โ”‚โ”‚
โ”‚  โ”‚ Partition 2 entry (primary or extended)                 โ”‚โ”‚
โ”‚  โ”‚ Partition 3 entry (primary or extended)                 โ”‚โ”‚
โ”‚  โ”‚ Partition 4 entry (primary or extended)                 โ”‚โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜โ”‚
โ”‚                                                              โ”‚
โ”‚  If entry 3 is extended:                                     โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”โ”‚
โ”‚  โ”‚ Extended container (sdb3)                               โ”‚โ”‚
โ”‚  โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚โ”‚
โ”‚  โ”‚ โ”‚ Logical partition 5 (sdb5)                          โ”‚โ”‚โ”‚
โ”‚  โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚โ”‚
โ”‚  โ”‚ โ”‚ Logical partition 6 (sdb6)                          โ”‚โ”‚โ”‚
โ”‚  โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚โ”‚
โ”‚  โ”‚ โ”‚ Logical partition 7 (sdb7)                          โ”‚โ”‚โ”‚
โ”‚  โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜โ”‚
โ”‚                                                              โ”‚
โ”‚  Four primary slots. One can be an extended container.       โ”‚
โ”‚  Logical partitions numbered from 5.                          โ”‚
โ”‚                                                              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

GPT Partition Table Structure

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  GPT                                                         โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”โ”‚
โ”‚  โ”‚ Protective MBR (first sector)                           โ”‚โ”‚
โ”‚  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”คโ”‚
โ”‚  โ”‚ GPT header                                              โ”‚โ”‚
โ”‚  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”คโ”‚
โ”‚  โ”‚ Partition entry 1 (primary)                             โ”‚โ”‚
โ”‚  โ”‚ Partition entry 2 (primary)                             โ”‚โ”‚
โ”‚  โ”‚ Partition entry 3 (primary)                             โ”‚โ”‚
โ”‚  โ”‚ ...                                                     โ”‚โ”‚
โ”‚  โ”‚ Partition entry 128 (primary)                           โ”‚โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜โ”‚
โ”‚                                                              โ”‚
โ”‚  No extended partition. No logical partition chain.          โ”‚
โ”‚  All partitions are primary.                                 โ”‚
โ”‚                                                              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Tool Comparison

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  TOOL           TABLE        COMMIT MODEL                   โ”‚
โ”‚                                                              โ”‚
โ”‚  fdisk          MBR + GPT    Staged (w to write)            โ”‚
โ”‚  gdisk          GPT          Staged (w to write)            โ”‚
โ”‚  parted         MBR + GPT    Immediate (per command)        โ”‚
โ”‚                                                              โ”‚
โ”‚  fdisk and gdisk: changes are not applied until w            โ”‚
โ”‚  parted: each command takes effect immediately               โ”‚
โ”‚                                                              โ”‚
โ”‚  For scripting, parted's immediate model is convenient       โ”‚
โ”‚  but less forgiving of mistakes.                             โ”‚
โ”‚                                                              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Boot Compatibility

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  FIRMWARE          BOOT DISK TABLE                           โ”‚
โ”‚                                                              โ”‚
โ”‚  Legacy BIOS  โ”€โ”€โ–บ  MBR required                              โ”‚
โ”‚  UEFI         โ”€โ”€โ–บ  GPT required                              โ”‚
โ”‚                                                              โ”‚
โ”‚  Non-boot data disk:                                         โ”‚
โ”‚  Either table works on either firmware.                      โ”‚
โ”‚                                                              โ”‚
โ”‚  The boot disk is the constraint.                            โ”‚
โ”‚  Data disks can use GPT regardless of firmware.              โ”‚
โ”‚                                                              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Summary

ItemValue
MBR max disk size2 TB
MBR primary partitions4
MBR extended partitionContainer for logical partitions
Logical partition numberingStarts at 5
GPT max partitions128 (default)
GPT partition typeAll primary
GPT protective MBRFirst sector, legacy compatibility
Boot compatibilityBIOS โ†’ MBR; UEFI โ†’ GPT
MBR Linux native type83
MBR Linux swap type82

Key takeaways:

  • The partition table type is determined at creation and changing it destroys the layout. fdisk with o creates an empty MBR table. gdisk with o creates an empty GPT table. Both operations remove all existing partition entries .
  • MBR is limited to four primary partitions. To exceed four, one primary slot must become an extended partition. Logical partitions inside it are numbered from 5. The extended partition itself cannot store data .
  • GPT has no extended/logical distinction. All partitions are primary. The default limit is 128, which is a tool constraint, not a table constraint .
  • Boot disk compatibility is determined by firmware. Legacy BIOS requires MBR for the boot disk. UEFI requires GPT. Non-boot data disks can use GPT on any system .
  • Swap is a partition type and a formatting decision. The partition type ID (82 in MBR) marks it as swap, but the actual activation requires mkswap and swapon. The size guidelines in Red Hat documentation are recommendations based on RAM and hibernation, not enforced constraints .

Remember: Partitioning is the first layer of storage abstraction. The partition table tells the firmware and the OS where the partitions are. The partition type tells tools what the partition is intended for. The filesystem or swap signature inside the partition tells the OS how to use it. MBR and GPT are two different ways of recording the first layer, and the choice between them is constrained by disk size and boot firmware. The exam tests the ability to inspect the current table, create the correct type, and recognize when the constraints make one type impossible.

Was this helpful?


Stop using slow, ad-bloated tool sites! ๐Ÿคฎ

๐Ÿ”Ž Search “KandZ Tools” on Google to use many professional utilities for free.

KandZ.me is the ultimate minimalist hub for:
โœ… Finance (Mortgage, Interest, Inflation)
โœ… Tech (Base64, JSON, Dev Suite, IP)
โœ… Health (BMI, BMR, TDEE)
โœ… Productivity (Timer, Workspace, QR)

โšก๏ธ Fast & Private
๐Ÿ”’ No data leaves your device
๐Ÿ’Ž 100% Free

๐Ÿ”— Use it now: https://tools.kandz.me
๐Ÿ”– Bookmark itโ€”youโ€™ll need it later!