Ubuntu – Convert Hybrid GPT/MBR to pure GPT partition scheme

gptmbrpartitioning

I was wondering how to safely convert a Hybrid GPT/MBR to a pure GPT partition scheme? (Without Reformatting)

The reason why I ask is, I currently triple-boot with Ubuntu 16.04 LTS, Windows 10 and Mac OSX Lion.

Originally I needed to format my drive with a Hybrid partition scheme to install Windows 7 but I have since upgraded to Windows 10.

I know now that Windows 10 supports booting from GPT partitions and I would like to covert everything to a pure GPT partition scheme without reformatting.

If I can do this, I would be able to reformat my HFS+ partition to an APFS partition and install High Sierra.

So the questions are:

  1. How do I convert my Hybrid MBR to a pure GPT?
  2. Will it break booting into any of my OSes if I do? (Windows 10, Linux, MacOSX)

Here is my gdisk output:

GPT fdisk (gdisk) version 1.0.1

Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.

Command (? for help): p
Disk /dev/sda: 3907029168 sectors, 1.8 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): CBC86EEB-C878-4C46-9963-120433EB0BED
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 3907029134
Partitions will be aligned on 8-sector boundaries
Total free space is 269477 sectors (131.6 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              40          409639   200.0 MiB   EF02  EFI System Partition
   2          409640       293378391   139.7 GiB   AF00  Mac OSX
   3       293642240       684265471   186.3 GiB   0700  WINDOWS 7
   4       684265472      1075085311   186.4 GiB   0700  LINUX
   5      1075085865      1087375589   5.9 GiB     8200  
   6      1087375590      3907024064   1.3 TiB     0700  

Best Answer

From the gdisk(8) manual:

n – Create a new protective MBR. Use this option if the current protective MBR is damaged in a way that gdisk doesn't automatically detect and correct, or if you want to convert a hybrid MBR into a "pure" GPT with a conventional protective MBR.

You need to enter the experts’ menu to access this option.

  1. Open the drive in gdisk:

    sudo gdisk /dev/sdX
    
  2. Enter the experts’ menu (x).

  3. Create a new protective MBR (n) and answer any dialogue questions as suitable.

  4. Return to the main menu (m).

  5. Write the changes to the drive and exit gdisk (w).

You may need to reinstall Grub in EFI mode if it was installed in MBR mode before.

Related Question