GUID Partition Table
GUID Partition Table (GPT) is a standard for the layout of the partition table on a physical storage device used in a desktop or server PC, such as a hard disk drive or solid-state drive, using globally unique identifiers (GUID). Although it forms a part of the Unified Extensible Firmware Interface (UEFI) standard (Unified EFI Forum proposed replacement for the PC BIOS), it is also used on some BIOS systems because of the limitations of master boot record (MBR) partition tables, which use 32 bits for storing logical block addresses (LBA) and size information on a traditionally 512-byte disk sector.
All modern PC operating systems support GPT. Some, including macOS and Microsoft Windows on x86, support booting from GPT partitions only on systems with EFI firmware, but FreeBSD and most Linux distributions can boot from GPT partitions on systems with both legacy BIOS firmware interface and EFI.
History
The widespread MBR partitioning scheme, dating from the early 1980s, imposed limitations that affect the use of modern hardware. One of the main limitations is the usage of 32 bits for storing block addresses and quantity information. For hard disks with 512-byte sectors, the MBR partition table entries allow up to a maximum of 2 TiB (232 × 512 bytes).[1]
Intel therefore developed a new partition table format in the late 1990s as part of what eventually became UEFI. Template:As of, GPT forms a subset of the UEFI specification.[2] GPT allocates 64 bits for logical block addresses, therefore allowing a maximum disk size of 264 sectors. For disks with 512-byte sectors, maximum size is 9.4 ZB (9.4 × 1021 bytes) or 8 ZiB (coming from 264 sectors × 29 bytes per sector).[1][3]
Features
Like modern MBRs, GPTs use logical block addressing (LBA) in place of the historical cylinder-head-sector (CHS) addressing. The protective MBR is contained in LBA 0, the GPT header is in LBA 1, and the GPT header has a pointer to the partition table, or Partition Entry Array, typically LBA 2. The UEFI specification stipulates that a minimum of 16,384 bytes, regardless of sector size, be allocated for the Partition Entry Array.[4] On a disk having 512-byte sectors, a partition entry array size of 16,384 bytes and the minimum size of 128 bytes for each partition entry, LBA 34 is the first usable sector on the disk.
Hard-disk manufacturers are transitioning to 4,096-byte sectors. The first such drives continued to present 512-byte physical sectors to the OS, so degraded performance could result when the drive's physical 4-KB sector boundaries did not coincide with the 4 KB logical blocks, clusters and virtual memory pages common in many operating systems and file systems. This was a particular problem on writes, when the drive is forced to perform two read-modify-write operations to satisfy a single misaligned 4 KB write operation.[5]
MBR variants
Template:AnchorProtective MBR (LBA 0)
For limited backward compatibility, the space of the legacy MBR is still reserved in the GPT specification, but it is now used in a way that prevents MBR-based disk utilities from misrecognizing and possibly overwriting GPT disks. This is referred to as a protective MBR.[3]
A single partition type of Template:Mono, encompassing the entire GPT drive (where "entire" actually means as much of the drive as can be represented in an MBR), is indicated and identifies it as GPT. Operating systems and tools which cannot read GPT disks will generally recognize the disk as containing one partition of unknown type and no empty space, and will typically refuse to modify the disk unless the user explicitly requests and confirms the deletion of this partition. This minimizes accidental erasures.[3] Furthermore, GPT-aware OSes may check the protective MBR and if the enclosed partition type is not of type Template:Mono or if there are multiple partitions defined on the target device, the OS may refuse to manipulate the partition table.[6]
While the MBR and protective MBR layouts were defined around 512 bytes per sector, the actual sector size can be larger on various media such as MO disks or hard disks with Advanced Format.Template:Citation needed
If the actual size of the disk exceeds the maximum partition size representable using the legacy 32-bit LBA entries in the MBR partition table, the recorded size of this partition is clipped at the maximum, thereby ignoring the rest of disk. This amounts to a maximum reported size of 2 TiB, assuming a disk with 512 bytes per sector (see 512e). It would result in 16 TiB with 4 KiB sectors (4Kn), but since many older operating systems and tools are hard wired for a sector size of 512 bytes or are limited to 32-bit calculations, exceeding the 2 TiB limit could cause compatibility problems.[3]
Template:AnchorHybrid MBR (LBA 0 + GPT)
In operating systems that support GPT-based boot through BIOS services rather than EFI, the first sector is also still used to store the first stage of the bootloader code, but modified to recognize GPT partitions. The bootloader in the MBR must not assume a sector size of 512 bytes.[3]
Partition table header (LBA 1)
Offset | Length | Contents |
---|---|---|
0 (0x00) | 8 bytes | Signature ("EFI PART", Template:Mono or Template:MonoTemplate:Efn on little-endian machines) |
8 (0x08) | 4 bytes | Revision (for GPT version 1.0 (through at least UEFI version 2.7 (May 2017)), the value is Template:Mono) |
12 (0x0C) | 4 bytes | Header size in little endian (in bytes, usually Template:Mono or 92 bytes) |
16 (0x10) | 4 bytes | CRC32/zlib of header (offset +0 up to header size) in little endian, with this field zeroed during calculation |
20 (0x14) | 4 bytes | Reserved; must be zero |
24 (0x18) | 8 bytes | Current LBA (location of this header copy) |
32 (0x20) | 8 bytes | Backup LBA (location of the other header copy) |
40 (0x28) | 8 bytes | First usable LBA for partitions (primary partition table last LBA + 1) |
48 (0x30) | 8 bytes | Last usable LBA (secondary partition table first LBA - 1) |
56 (0x38) | 16 bytes | Disk GUID (also referred as UUID on UNIXes) |
72 (0x48) | 8 bytes | Starting LBA of array of partition entries (always 2 in primary copy) |
80 (0x50) | 4 bytes | Number of partition entries in array |
84 (0x54) | 4 bytes | Size of a single partition entry (usually Template:Mono or 128) |
88 (0x58) | 4 bytes | CRC32/zlib of partition array in little endian |
92 (0x5C) | * | Reserved; must be zeroes for the rest of the block (420 bytes for a sector size of 512 bytes; but can be more with larger sector sizes) |
The partition table header defines the usable blocks on the disk. It also defines the number and size of the partition entries that make up the partition table.Template:Citation needed
Partition entries (LBA 2-33)
Offset | Length | Contents |
---|---|---|
0 (0x00) | 16 bytes | Partition type GUID |
16 (0x10) | 16 bytes | Unique partition GUID |
32 (0x20) | 8 bytes | First LBA (little endian) |
40 (0x28) | 8 bytes | Last LBA (inclusive, usually odd) |
48 (0x30) | 8 bytes | Attribute flags (e.g. bit 60 denotes read-only) |
56 (0x38) | 72 bytes | Partition name (36 UTF-16LE code units) |
After the header, the Partition Entry Array describes partitions, using a minimum size of 128 bytes for each entry block.[7] The starting location of the array on disk, and the size of each entry, are given in the GPT header. The first 16 bytes of each entry designate the partition type's globally unique identifier (GUID). For example, the GUID for an EFI system partition is Template:Mono. The second 16 bytes are a GUID unique to the partition. Then follow the starting and ending 64 bit LBAs, partition attributes, and the 36 character (max.) Unicode partition name. As is the nature and purpose of GUIDs and as per RFC4122[8], no central registry is needed to ensure the uniqueness of the GUID partition type designators.
The 64-bit partition table attributes are shared between 48-bit common attributes for all partition types, and 16-bit type-specific attributes:
Bit | Content |
---|---|
0 | Platform required (required by the computer to function properly, OEM partition for example, disk partitioning utilities must preserve the partition as is) |
1 | EFI firmware should ignore the content of the partition and not try to read from it |
2 | Legacy BIOS bootable (equivalent to active flag (typically bit 7 set) at offset Template:Mono in partition entries of the MBR partition table)[9] |
3–47 | Reserved for future use |
48–63 | Defined and used by the individual partition type |
Microsoft defines the type-specific attributes for basic data partition as:[10][11]
Bit | Content |
---|---|
60 | Read-only |
61 | Shadow copy (of another partition) |
62 | Hidden |
63 | No drive letter (i.e. do not automount) |
Google defines the type-specific attributes for Chrome OS kernel as:[12]
Bit | Content |
---|---|
56 | Successful Boot Flag |
55-52 | Tries Remaining |
51-48 | Priority (15 = highest, 1 = lowest, 0 = not bootable) |
Template:AnchorOperating-system support
UNIX and Unix-like systems
OS family | Version or edition | Platform | Read and write support | Boot support | Note |
---|---|---|---|---|---|
FreeBSD | Since 7.0 | IA-32, x86-64, ARM | Template:Yes | Template:Yes | In a hybrid configuration, both GPT and MBR partition identifiers may be used. |
Linux | Most of the x86 Linux distributions Fedora 8+ and Ubuntu 8.04+[13] |
IA-32, x86-64 | Template:Yes | Template:Yes | New tools such as gdisk, GNU Parted,[14][15] util-linux v2.23+ fdisk,[16][17] SYSLINUX, GRUB 0.96 + patches and GRUB 2 have been GPT-enabled. |
macOS | Since 10.4.0 (some features since 10.4.6)[18] | IA-32, x86-64, PowerPC | Template:Yes | Template:Yes | Only Intel Macintosh computers can boot from GPT. |
MidnightBSD | Since 0.4-CURRENT | IA-32, x86-64 | Template:Yes | Template:Partial | In a hybrid configuration, both GPT and MBR partition identifiers may be used. |
NetBSD | Since 6.0[19] | x86[20], x86-64[21] | Template:Yes | Template:Partial | Some users describe their installation procedure with EFI[22] but the official announcement of the support has not yet been made. a semi-manual UEFI installation works on NetBSD 8.0 (-current)[23] |
Solaris | Since Solaris 10 | IA-32, x86-64, SPARC | Template:Yes | Template:Yes | [24] |
HP-UX | Since HP-UX 11.20 | IA-64 | Template:Yes | Template:Yes | [25] |
Windows: 32-bit versions
Windows 7 and earlier do not support UEFI on 32-bit platforms, and therefore do not allow booting from GPT partitions. [26]
OS version | Release date | Platform | Read or write support | Boot support | Note |
---|---|---|---|---|---|
Windows XP | 2001-10-25 | IA-32 | Template:No | Template:No | |
Windows Server 2003 | 2003-04-24 | IA-32 | Template:No | Template:No | |
Windows Server 2003 SP1 | 2005-03-30 | IA-32 | Template:Yes | Template:No | MBR takes precedence in hybrid configuration |
Windows Vista | 2006-07-22 | IA-32 | Template:Yes | Template:No | MBR takes precedence in hybrid configuration |
Windows Server 2008 | 2008-02-27 | IA-32 | Template:Yes | Template:No | MBR takes precedence in hybrid configuration |
Windows 7 | 2009-10-22 | IA-32 | Template:Yes | Template:No | MBR takes precedence in hybrid configuration |
Windows 8 | 2012-08-01 | IA-32 | Template:Yes | Template:Partial[27] | MBR takes precedence in hybrid configuration |
Windows 8.1 | 2013-08-27 | IA-32 | Template:Yes | Template:Partial[27] | MBR takes precedence in hybrid configuration |
Windows 10 | 2015-07-29 | IA-32 | Template:Yes | Template:Partial[27] | MBR takes precedence in hybrid configuration |
Windows: 64-bit versions
OS version | Release date | Platform | Read and write support | Boot support | Note |
---|---|---|---|---|---|
Windows XP Professional x64 Edition Windows Server 2003 |
2005-04-25[28] | x64 | Template:Yes | Template:No | MBR takes precedence in hybrid MBR configuration |
Windows Server 2003 | 2005-04-25 | IA-64 | Template:Yes | Template:Yes | MBR takes precedence in hybrid MBR configuration |
Windows Vista | 2006-07-22 | x64 | Template:Yes | Template:PartialTemplate:Efn | MBR takes precedence in hybrid configuration |
Windows Server 2008 | 2008-02-27 | x64 | Template:Yes | Template:Partial | MBR takes precedence in hybrid configuration |
Windows Server 2008 | 2008-02-27 | IA-64 | Template:Yes | Template:Yes | MBR takes precedence in hybrid configuration |
Windows 7 | 2009-10-22 | x64 | Template:Yes | Template:PartialTemplate:Efn | MBR takes precedence in hybrid configuration. |
Windows Server 2008 R2 | 2009-10-22 | IA-64 | Template:Yes | Template:Yes | MBR takes precedence in hybrid configuration |
Windows 8 Windows Server 2012 |
2012-08-01 | x64 | Template:Yes | Template:Partial[27] | MBR takes precedence in hybrid configuration. |
Windows 8.1 | 2013-08-27 | x64 | Template:Yes | Template:Partial[27] | MBR takes precedence in hybrid configuration |
Windows 10 | 2015-07-29 | x64 | Template:Yes | Template:Partial[27] | MBR takes precedence in hybrid configuration |
Windows Server 2016 | 2016-10-12 | x64 | Template:Yes | Template:Partial[27] | MBR takes precedence in hybrid configuration |
Partition type GUIDs
See also
- Advanced Active Partition (AAP)
- Apple Partition Map (APM)
- Boot Engineering Extension Record (BEER)
- BSD disklabel
- Device Configuration Overlay (DCO)
- Extended Boot Record (EBR)
- Host Protected Area (HPA)
- Partition alignment
- Rigid Disk Block (RDB)
- Volume Table of Contents (VTOC)
Notes
References
| references-column-width | references-column-count references-column-count-{{#if:1|35em}} }} | {{#if: | references-column-width }} }}" style="{{#if: 35em | {{#iferror: {{#ifexpr: 35em > 1 }} | Template:Column-width | Template:Column-count }} | {{#if: | Template:Column-width }} }} list-style-type: {{#switch: | upper-alpha | upper-roman | lower-alpha | lower-greek | lower-roman = {{{group}}} | #default = decimal}};">
- ↑ 1.0 1.1 Template:Cite news
- ↑ Template:Cite journal
- ↑ 3.0 3.1 3.2 3.3 3.4 Template:Cite news
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ The GPT header contains a field that specifies the size of a partition table entry. The minimum required is 128 bytes, but implementations must allow for other values. See Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ https://technet.microsoft.com/en-us/library/cc753455.aspx#Anchor_1
- ↑ https://msdn.microsoft.com/en-us/library/aa381635.aspx
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web.
- ↑ Template:Cite web.
- ↑ Template:Cite web.
- ↑ Template:Cite web.
- ↑ Template:Cite web.
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ 26.0 26.1 26.2 Template:Cite web
- ↑ 27.0 27.1 27.2 27.3 27.4 27.5 27.6 Windows 8 32-bit supports booting from UEFI-based PC using GPT-based disks.
- ↑ Microsoft raises the speed limit with the availability of 64-bit editions of Windows Server 2003 and Windows XP Professional Template:Webarchive
- ↑ ftp://download.gigabyte.ru/manual/mb_manual_intel-ui_e.pdf
- ↑ Template:Cite web
- ↑ 31.0 31.1 31.2 31.3 31.4 31.5 The Discoverable Partitions Specification
- ↑ Template:Cite web
- ↑ 33.0 33.1 Template:Cite web
- ↑ 34.0 34.1 Template:Cite web
- ↑ 35.0 35.1 Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ src/add-ons/kernel/partitioning_systems/gpt/gpt_known_guids.h
- ↑ http://www.midnightbsd.org/cgi-bin/cvsweb.cgi/src/sys/sys/gpt.h.diff?r1=1.4;r2=1.5 src/sys/sys/gpt.h
- ↑ QNX Power-safe filesystem
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
- ↑ Template:Cite web
External links
- Microsoft TechNet: Disk Sectors on GPT Disks (archived page)
- Microsoft TechNet: Troubleshooting Disks and File Systems
- Microsoft TechNet: Using GPT Drives
- Microsoft: FAQs on Using GPT disks in Windows
- Microsoft Technet: How Basic Disks and Volumes Work A bit MS-specific but good figures relate GPT to older MBR format and protective-MBR, shows layouts of complete disks, and how to interpret partition-table hexdumps.
- Apple Developer Connection: Secrets of the GPT
- Make the most of large drives with GPT and Linux
- Convert Windows Vista SP1+ or 7 x86_64 boot from BIOS-MBR mode to UEFI-GPT mode without Reinstall
- Support for GPT (Partition scheme) and HDD greater than 2.19 TB in Microsoft Windows XP
- Setting up a RAID volume in Linux with >2TB disks