How to change the GPT partition type of an EFI partition?

You can change the partition type with GPT fdisk. This can be done in a running system, booted from the disk on which you want to only change that single unused partition to EFI, leaving the other partitions unchanged.

You can download the current version of gdisk from here : https://sourceforge.net/projects/gptfdisk/files/gptfdisk/

After installing, to change the type of your disk0s1 partition, in Terminal :

  • sudo umount /dev/disk0s1 in case it is mounted.
  • sudo gdisk /dev/disk0

Then in gdisk, use these commands :

  • ? to print the list of commands
  • p to print the partition table
  • l to list partition type codes Then
  • Use t to change the partition type
    • Enter 1 when prompted to select the partition (assuming you want to change partition 1)
    • Enter ef00 for the "Hex code or GUID" to change the type to "EFI"
  • Use c to change the partition name
    • Enter 1 when prompted to select the partition
    • Enter EFI for the name Finally
  • Use p to check it is as you intended,
  • and w to actually write the new partition to disk and exit
  • Reboot.