The GPT tag should be applied to questions that relate to partitioning or use of GPT disks, such as difficulties creating, deleting, or editing partitions. Issues that are GPT-specific, as opposed to general partitioning issues, are particularly good candidates for using this tag. Examples include details of partition type codes or GPT-specific features such as partition labels. General partitioning questions may also be relevant if the disk uses GPT, such as on a Mac or a new computer that ships with Windows 8 or later.
GPT's important features, compared to the older Master Boot Record (MBR) partitioning system, include:
- 64-bit pointers to support disks of up to 8 ZiB, as opposed to 2 TiB for MBR. (Both figures assume 512-byte logical sectors.)
- Support for up to 128 partitions by default. (This value can be raised by using GPT fdisk (
gdisk), if desired.) GPT does not employ the concepts of primary, extended, and logical partitions, although some partitioning tools label all GPT partitions as "primary" because these tools were originally designed with MBR in mind.
- Partitions can have 36-character Unicode labels. Note that these are distinct from the labels supported by most filesystems.
- Most GPT data structures are written twice, once at the start of the disk and again at the end. This feature provides a backup in case the primary data structures are accidentally deleted.
- Checksum values are stored for all the important GPT data structures, enabling OSes and partitioning tools to identify damaged data structures and use the backup instead.
- Partition type codes are 128-bit (16-byte) Globally Unique Identifier (GUID) values, as opposed to the 8-bit (1-byte) type codes used on MBR. This feature makes collisions theoretically less likely on GPT; however, until recently most Linux partitioning tools have used the Windows GPT type code for Linux filesystem partitions. Ubuntu 13.10 uses a Linux-specific GPT type code, though.
- Disks and partitions both have GUIDs as serial numbers, enabling reliable identification of disks and partitions. These GUIDs are independent of the Universally Unique Identifiers (UUIDs) used on Linux filesystems.
Be aware that not all OSes are GPT-aware, so if you use GPT, you may have problems using the disk with other OSes, such as Windows XP. Although Windows Vista and later support GPT, they can boot from GPT disks only with EFI firmware, so using GPT is inadvisable if you expect to dual-boot in BIOS mode.
You can use three families of tools to partition GPT disks:
- libparted -- This library supports MBR, GPT, and several other partition table types. It's the core of the text-mode
parted, the GUI GParted, and the partitioner used by the Ubuntu installer. When partitioning a new disk to use GPT, you must explicitly create a new partition table (aka "disk label") of type
- GPT fdisk -- This tool consists of three programs:
sgdisk, which are similar to the MBR tools
sfdisk, respectively. The GPT fdisk tools are text-only and can therefore be intimidating to the inexperienced, but are very flexible. The
sgdisktools, in particular, enable GPT operations that are supported by few other tools. For instance, these tools enable resizing the partition table to support more than 128 partitions, manually specifying which partition table to use, and converting from MBR to GPT format while preserving the existing partitions.
fdisk-- Versions 2.23 and later of
fdisksupport GPT, but earlier versions do not. (Note that Ubuntu 13.10 ships with
fdisk2.20, which does not support GPT.) This tool is a favorite of old-school Linux users, but its text-mode user interface can be intimidating to newcomers. It's less flexible than
gdisk, which models its user interface after