Ubuntu – How to check and change the partition table type

gptmbrpartitioningwindows 8

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 style on these computers and vice versa.

(Non-UEFI installs can be done but need a special partition. UEFI installs on MBR partitioned disks also seem to be possible.)

Best Answer

What is a partition table? How is it related to Windows 8?

In addition to general partitioning, it should be noted that information about partitions are stored in a partition table on the hard disk.

The whole topic didn't receive much attention because DOS/Windows computers – where one would install Linux onto – just had one choice for almost three decades. (MBR was introduced in 1983.) Until Windows 8 finally replaced the long overdue and outdated BIOS/MBR subsystem combination with UEFI/GPT. (Comparison of GPT and MBR on the Arch Wiki.)

While GPT is the name for the new format, there is some confusion about how to name the old one as MBR previously described the bootloader code that is stored along the partition information in the partition table.

How do I check and change the partition table?

Read these instructions carefully before you start!

Also note that you can convert partition tables: How can I change/convert a Ubuntu MBR drive to a GPT, and make Ubuntu boot from EFI?

  1. GUI-method - Using GParted

    To find out what partition table type the selected drive has select View > Device Information from the menu.

    GParted showing /dev/sdb selected and 'Device Information' menu entry

    Select the disk of which you want to change the partition, then select Device > Create Partition Table from the menu.

    GParted showing 'Create Partition Table' menu entry

    If you get a warning that the device contains active partitions, unmount these. Note that you cannot unmount partitions of your currently running operating system. You will then see the window below, where you can choose the partition table type. msdos is what GParted calls the old format, gpt the newer one. All the others for other operating systems or architectures.

    Please also note the warning message. Creating a new partition table will discard all information about existing partitions on the disk. It will not overwrite data on the partitions, but you still don't want to have to dig through and restore data afterwards. Therefore consider the old partitions gone and all data lost after you created the new partition table and backup your data before doing so.

    GParted asking to create a partition table on /dev/sdb

  2. CLI-method - Using parted

    To display partition table information run:

    sudo parted --list

    To create a new partition table run:

    # This is a destructive action that will destroy all data on the partitions of the device
    sudo parted device mklabel label-type

    device should be replaced with the device name (e.g. /dev/sdb) and label-type with msdos or gpt.

    You can also run parted interactively by just running sudo parted. More details in the manpage.