GPT has some other advantages over MBR:
The disadvantages are:
New disks may come already partitioned with GPT. Other will come with MBR partition table or no partition table at all.
GPT can be created and edited with gdisk or parted. gdisk is a utility similar to fdisk, but made to manipulate GPT instead of MBR.
parted will create GPT if told to by the
mklabel gpt command.
GPT partition types are identified by GUIDs instead of one-byte identifier used in MBR, so there is no limit on number of possible partition types and no central registry is needed. Though, using such long identifiers would be inconvenient, so gdisk uses 16-bit hexadecimal codes for known partition types.
If gdisk is run on a MBR-partitioned HDD it will attempt to convert it to GPT automatically. This will only succeed if there is enough place to put the primary and secondary GPT records on the HDD – the sectors just after the MBR and sectors at the end of the disks must not be allocated to any partition.
The space for the primary GPT is usually not assigned to any partition because of partition alignment used (if 'DOS compatibility mode' was used, the first partition will start on sector 63, otherwise it may start at the sector 2048 (first megabyte)), but the end of the disk will usually be taken by the last partition. So, to convert an existing HDD to GPT one has to shrink the last partition first.
To resize a partition (DANGEROUS!): – resize file system or other data on that partition. If it is ext2/3/4 file system – use resize2fs, if it is an LVM pv – use pvresize. – note current partition position and size, as displayed by the 'print' command of fdisk or gdisk – delete the partition – re-create the partition with the same start position, but the size adjusted
Remember to set up boot partitions (see below)
: to be written
Booting an (U)EFI system will be described in detail on the EFI page. The most important thing, as far as partitioning is concerned, is to create the EFI Boot Partition on the disk. It should be the first partition and be about 300MB in size. Examples
Most PC machines still use BIOS for booting. This is still possible with GPT, but there are some differences.
When MBR is in use, many boot loaders (e.g. GRUB) would store themselves on the sectors between the MBR and the first partition. This is not possible when GPT is in use, as the exact space is used by the GPT records. Instead a dedicated partition for the boot loader should be created. A special partition type has been defined – the BIOS Boot partition (UUID: 21686148-6449-6E6F-744E-656564454649, gdisk code: EF02). GRUB2 will use it if present.
GRUB legacy does not have any GPT support (unless patched for it) and won't normally boot from a GPT system, though it probably is possible to make it install and boot, using a hybrid mbr
Boot loaders stored in a file system (like SYSLINUX/extlinux) do not require a dedicated partition, but they still need GPT support to properly locate the file system.
SYSLINUX/extlinux, starting from version 4.00, see the
/usr/share/doc/syslinux-4.05/gpt.txt.gz file in the package.
: to be written