How to fix GPT PMBR size mismatch?

Learn the basics of GPT and MBR:

  • Back up every partition (XFS => xfsdump).
  • Enable UEFI Secure Boot in BIOS and disable MBR protection in BIOS. Disable CSM and hybrid mode (UEFI + CSM) in BIOS.
  • Wipe every MBR partition table and create a fresh new GPT partition table.
# cfdisk --zero /dev/sda
=> gpt
  • Fill the new GPT partition table with partitions.
    I recommend cfdisk for all partition table work.
# cfdisk /dev/sda
  • Restore backup (XFS => xfsrestore). Fill the new partitions with data from backup.