Questions tagged [gpt]

The GUID Partition Table (GPT) is a method of partitioning disks. It features up to 128 partitions by default and it uses 64-bit pointers, which means it fully supports disks of up to 8ZiB, as opposed to the 2TiB limit of the older Master Boot Record (MBR) partitioning scheme. GPT is most often used on EFI-based computers, but it is sometimes used on BIOS-based systems, too.

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.
  • GPT fdisk -- This tool consists of three programs: gdisk, cgdisk, and sgdisk, which are similar to the MBR tools fdisk, cfdisk, and sfdisk, respectively. The GPT fdisk tools are text-only and can therefore be intimidating to the inexperienced, but are very flexible. The gdisk and sgdisk tools, 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 fdisk support GPT, but earlier versions do not. (Note that Ubuntu 13.10 ships with fdisk 2.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 fdisk's.
355 questions
84
votes
4 answers

How can I change/convert a Ubuntu MBR drive to a GPT, and make Ubuntu boot from EFI?

I recently have upgraded my PC, my new Motherboard (ASUS M5A99X EVO) uses UEFi instead of the regular MBR option. I have a Ubuntu 11.10 installation that I did when I had my previous hardware (MSI MS 7267) , Ubuntu alone boots fine, and so does…
Uri Herrera
  • 15,318
49
votes
3 answers

GPT vs MBR. Why not MBR?

I am a Linux user. I don't have Windows on my laptop. Also the hard drive size is less than 2 TB. Then why should I use GPT tables? Can't I go with old fasioned MBR? I will be having two root partitions, two home partitions, and a swap space. So…
daltonfury42
  • 5,559
29
votes
2 answers

How to prepare a disk on an EFI based PC for Ubuntu?

My computer has UEFI based BIOS and I want to start over from scratch. The PC came with Windows installed - I later installed Ubuntu alongside. I want to completely re-build my whole disk and install only Ubuntu on it. So it is not about how to…
cl-netbox
  • 31,491
28
votes
1 answer

Is separate EFI boot partition required?

In the past with BIOS, I've never created a separate partition for the bootloader. My question is, if i wish to use UEFI, is a separate boot partition a requirement? PS, I've tried without and it doesn't seem to work. Hence this question.
olfek
  • 1,353
27
votes
1 answer

How can I check and change the partition table type?

New computers that ship with Windows 8 also come with a different partition table than before. This along with the move to UEFI causes confusion, as users are unaware of the newer partition table and are trying to install operating systems in legacy…
LiveWireBT
  • 29,597
24
votes
6 answers

How to remove GPT from HDD?

I have a Asus K55VM-Sx027V laptop and I formated it with Ubuntu because whenever I tried to install Windows 7 64bit, it wouldn't let me because my HDD had GPT protection. Now that I have Ubuntu 12.10, how do I remove GPT protection from my laptop?
Diogo
  • 241
23
votes
2 answers

Mount exited with exit code 13

I have a 1TB external hard drive that I recently formatted to NTFS. It was mounting on my Ubuntu 11.10 fine until just now. I didn't make any changes to affect my OS or my exhdd. The error that I get is: Error mounting: mount exited with exit code…
dearN
  • 2,209
23
votes
4 answers

Convert MBR partition to GPT without data loss

I have an MBR partition which I want to convert to GPT without loosing all my data. Bios is UEFI. I am not an expert of hard disks, so please be patient. I have seen this and this but I cannot understand if I can apply those procedures without…
21
votes
3 answers

GPT PMBR size mismatch after dd clone

I am migrating my Ubuntu EFI boot system to a larger hdd. I used the command dd if=/dev/sdb of=/dev/sda I did not dismount the input file before copying and the output file was fresh unpartitioned space. I have successfully booted from the new…
21
votes
2 answers

Can't format or delete partitions in pendrive because of GPT table error

This is what I got while trying to format a partition in my pendrive: Error deleting partition /dev/sdb1: Command-line parted --script "/dev/sdb" "rm 1"' exited with non-zero exit status 1: Warning: /dev/sdb contains GPT signatures, indicating that…
20
votes
1 answer

Is it safe to format msftres, msftdata and hidden partitions?

I have an acer V7 which came with a 1TB HDD, 24GB SSD and Windows 8 installed. I have installed Ubuntu onto the SSD and formatted the main partitions of the HDD. However, I also notice 3 other partitions on the HDD marked msftres, msftdata. Is it…
db579
  • 454
17
votes
2 answers

Proper alignment of partitions on an Advanced Format HDD using Parted

First I create a properly aligned partition in a new GPT table using parted by specifying percentages for start and end of the partition: # parted -a optimal /dev/sdb GNU Parted 2.3 Using /dev/sdb Welcome to GNU Parted! Type 'help' to view a list of…
Deleted
  • 848
15
votes
1 answer

Can't boot into Windows 7 EFI GPT after recovery operation

My question, or rather issue, is in the extent of this previous case in which I wanted to grow my Linux (ext4) partition. The partition /dev/sda6 was in the way of doing this and since it contained bios_grub I didn't touch it until someone with…
Nkciy84
  • 997
15
votes
4 answers

Why does the first partition start at sector 34 when I choose "Guided - Use entire disk" during install?

After choosing "Guided - Use entire disk" during installation of Ubunsut Server 12.04 I find that the first partition starts on sector 34. Why that specific sector and not the first one? (parted) print Model: ATA WDC WD30EZRX-00M (scsi) Disk…
Deleted
  • 848
14
votes
7 answers

GRUB menu not showing with dual-boot UEFI mode installation

Previously I had Dell Inspiron Laptop with Legacy Boot and MBR disk partitioning with pre-installed Ubuntu 12.04. I needed dual boot with Windows. So I formatted it completely using Live USB, installed new Windows 8.1 and then installed Ubuntu…
user398958
1
2 3
23 24