Partition types: GPT GUIDs & MBR codes
Every partition on a block storage device has a type identifier that tells operating systems, bootloaders, and firmware what the partition is for. On GPT disks, partition types are 128-bit GUIDs. On MBR disks, types are 1-byte hexadecimal codes. The fdisk and gdisk walkthrough shows how to create partitions and assign these type GUIDs from the command line.
GPT partition type GUIDs vs. MBR hex codes
| Partition Purpose | GPT Type GUID | MBR Code | fdisk Shortcut | gdisk Shortcut |
|---|---|---|---|---|
| EFI System Partition (ESP) | C12A7328-F81F-11D2-BA4B-00A0C93EC93B | 0xEF | 1 | EF00 |
| Linux Root (x86_64) | 4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709 | 0x83 | 23 | 8304 |
| Linux Root (ARM64) | B921B045-1DF0-41C3-AF44-4C6F280D3FAE | 0x83 | 27 | 8305 |
| Linux Generic Filesystem Data | 0FC63DAF-8483-4772-8E79-3D69D8477DE4 | 0x83 | 20 | 8300 |
| Linux Swap | 0657FD6D-A4AB-43C4-84E5-0933C84B4F4F | 0x82 | 19 | 8200 |
Linux Home (/home) | 933AC7E1-2EB4-4F13-B844-0E14E2AEF915 | 0x83 | 42 home | 8302 |
Linux Server Data (/srv) | 3B8F8425-20E0-4F3B-907F-1A25A76F98E8 | 0x83 | 21 | 8306 |
| Linux Extended Boot (XBOOTLDR) | BC13C2FF-59E6-4262-A352-B275FD6F7172 | 0xEA | xbootldr | EA00 |
| Linux LVM | E6D6D379-F507-44C2-A23C-238F2A3DF928 | 0x8E | 30 lvm | 8E00 |
| Linux Software RAID | A19D880F-05FC-4D3B-A006-743F0F84911E | 0xFD | 29 raid | FD00 |
| Linux LUKS Encryption | CA7D7CCB-63ED-4C53-861C-1742536059CC | 0x83 | 8309 | 8309 |
| Microsoft Basic Data (NTFS/FAT) | EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 | 0x07 / 0x0B | 11 | 0700 |
The numeric codes shown above (e.g., 1, 19, 21, 23) are sequential positions in fdisk's type list and shift between util-linux releases as new partition types are added. For stable, version-independent input, use fdisk's string aliases (uefi, swap, home, linux, xbootldr) or the full GUID directly.
Discoverable Partitions Specification (DPS)
The Discoverable Partitions Specification (DPS), defined by the UAPI Group and implemented in systemd via systemd-gpt-auto-generator, uses standardized GPT Type GUIDs to automate partition discovery and mounting:
- Partitions formatted with standard GUIDs (such as Root, Home, Srv, and Swap) are automatically discovered and mounted at boot without requiring entries in
/etc/fstab. - Enables self-describing Discoverable Disk Images (DDIs) that can boot on bare metal, run in virtual machines, or launch inside containers using
systemd-nspawnandsystemd-dissectwithout manual configuration.
On systems that still use explicit mount entries, PARTUUID and filesystem UUIDs provide persistent identification in /etc/fstab. Filesystems such as Btrfs use the Linux Generic Filesystem Data GUID, since they manage subvolume layouts internally rather than relying on distinct partition types.
Inspecting partition types from the command line
# List partition types, filesystem types, and mount points
lsblk -o NAME,PARTTYPE,PARTTYPENAME,FSTYPE,SIZE,MOUNTPOINTS
# Inspect detailed GUID table entries with gdisk
sudo gdisk -l /dev/nvme0n1Sources & references
- UAPI.2 Discoverable Partitions Specification — canonical specification defining GPT partition type GUIDs for automatic partition discovery and mounting
- UEFI Specification — GUID Partition Table Format — official UEFI specification defining GPT disk layout and the EFI System Partition type GUID
- fdisk(8) — Linux manual page — official man page for fdisk, documenting GPT/MBR partition table manipulation and partition type codes
- gdisk(8) — GPT fdisk Manual — official man page for gdisk (GPT fdisk) hosted by the project author, documenting GPT-specific partition manipulation and type shortcuts
- systemd-gpt-auto-generator(8) — Linux manual page — official man page for the systemd generator that implements the Discoverable Partitions Specification
Frequently asked questions
What is a partition type identifier?
Every partition has a type identifier that tells operating systems, bootloaders, and firmware what the partition is for. On GPT disks this is a 128-bit GUID; on MBR disks it is a 1-byte hexadecimal code.
What is the GPT type GUID for the EFI System Partition?
The EFI System Partition (ESP) uses GPT type GUID C12A7328-F81F-11D2-BA4B-00A0C93EC93B, with MBR code 0xEF. In fdisk the shortcut is 1, and in gdisk it is EF00.
What is the GPT type GUID for Linux root x86_64?
Linux Root (x86_64) uses GPT type GUID 4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709, with MBR code 0x83. The fdisk shortcut is 23 and the gdisk shortcut is 8304.
What is the Discoverable Partitions Specification (DPS)?
DPS is defined by the UAPI Group and implemented in systemd via systemd-gpt-auto-generator. Partitions with standard type GUIDs (Root, Home, Srv, Swap) are automatically discovered and mounted at boot without /etc/fstab entries.
Are fdisk numeric type codes stable across versions?
No. The numeric codes (e.g., 1, 19, 23) are positional indices in fdisk's type list and shift between util-linux releases. Use string aliases like uefi, swap, home, linux, xbootldr, or the full GUID for stable input.
How do I inspect partition types from the command line?
Use lsblk -o NAME,PARTTYPE,PARTTYPENAME,FSTYPE,SIZE,MOUNTPOINTS to list partition types and filesystem types. Use sudo gdisk -l /dev/nvme0n1 to inspect detailed GUID table entries.