Convert Hybrid GPT/MBR to pure GPT partition scheme

13,351

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.

Share:
13,351

Related videos on Youtube

coolcatco888
Author by

coolcatco888

Updated on September 18, 2022

Comments

  • coolcatco888
    coolcatco888 over 1 year

    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  
    
    • phuclv
      phuclv almost 6 years
      even Windows 7 supports booting from UEFI natively
    • oldfred
      oldfred almost 6 years
      Review issues: rodsbooks.com/gdisk/hybrid.html Biggest issue is whether you can even convert a Windows BIOS boot to UEFI without re-installing, but this is an Ubuntu site and we do not know that. Converting from MBR to gpt: ubuntuforums.org/showthread.php?t=1454252
    • G5tube
      G5tube about 4 years
      It works as described. In fact I was able to restore broken APFS Volume on a hybrid partition. You need to have knowledge of the layout of the partitioning. For more info see this post: apple.stackexchange.com/questions/390955/…
  • coolcatco888
    coolcatco888 almost 6 years
    I'm using OSX Lion right now but as of this afternoon, I installed clover as my bootloader and now I cannot boot into it.
  • coolcatco888
    coolcatco888 almost 6 years
    Actually, could you know if it is safe to reformat just the MacOSX partition? If so, would I also be able to reformat it as a APFS partition?
  • aarnphm
    aarnphm almost 6 years
    @coolcatco888 I think that the only solution for your problem is that you can either stick with what you have right now or do a backup for your files in all OSes then do a fresh reinstall and format the drive as GPT. And I don't think you should reformat the OS partition because you can accidentally delete your bootloader.
  • coolcatco888
    coolcatco888 almost 6 years
    I think I will continue using it as a Hybrid MBR/GPT setup since there are no clear answers on whether it will work and what sort of pitfalls there are. My intent is simply to reformat the HFS+ partition and do a clean install of High Sierra. Lastly, Is it safe to simply reformat the HFS+ partition only without breaking anything? (Correct me if I am wrong, I think I may have to resync my Hybrid MBR with gdisk after installing High Sierra)
  • David Foerster
    David Foerster almost 6 years
    @coolcatco888: You can save the entire current partition table with gdisk (b in the main menu), make the above (or any) changes, see what happens and restore the partition table to its previous state with gdisk again (l in the recovery & transformation sub-menu).
  • tmm1
    tmm1 over 3 years
    Thanks! Is there any way to do the same with sgdisk?
  • David Foerster
    David Foerster over 3 years
    @tmm1: This question is specifically about gdisk. However, yours sounds like an excellent new question. I also found a similar one with the right answer.
  • coolcatco888
    coolcatco888 about 3 years
    I actually realized that reformatting or changing any partitions on a hybrid gpt will revert it back to a protective MBR. I can use the gdisk method to do this as well. In my case, I still needed the Hybrid MBR.