I have a perplexing problem with the EFI partition on my boot SSD. The GPT partition type is "Microsoft Basic Data". On all other drives in my system, including my Carbon Copy Cloner clone of my boot drive, the partition type is "EFI" (see below):
$ diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *512.1 GB disk0
1: Microsoft Basic Data EFI 209.7 MB disk0s1
2: Apple_HFS Tims Boot SSD 498.7 GB disk0s2
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *960.2 GB disk1
1: EFI EFI 209.7 MB disk1s1
2: Apple_HFS Users 959.9 GB disk1s2
...
/dev/disk4
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *512.1 GB disk4
1: EFI EFI 209.7 MB disk4s1
2: Apple_HFS Tims Boot SSD Clone 511.8 GB disk4s2
My system boots just fine, but it appears to be loading the bootloader (Clover in this case) from the /Users drive (disk1) instead of from the boot SSD (disk0), and I think the incorrect GPT partition type is to blame.
I tried to update the partition type using the "asr adjust" command as outlined at https://unix.stackexchange.com/questions/58705/mac-os-x-partition-type-problem, but it doesn't work and gives me a very unhelpful error message:
$ sudo asr adjust --target /dev/disk0s1 --settype EFI
asr: Volume adjustment failed: Unknown error: -123
I have found information about other possible ways to set the GPT partition type through Google searches, but all the other methods seem risky, with warnings about erasing the partition in question, etc.
Does anyone know how I can fix this?
Best Answer
I recreated your problem using a 4 GB flash drive. Below is the output from the command
diskutil list /dev/disk1
.Below is the output from the command
sudo gpt -r show /dev/disk1
The problem is the partition type GUID for the EFI partition is
EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
and it should beC12A7328-F81F-11D2-BA4B-00A0C93EC93B
.To correct this, I entered the following commands. In your case, you would substitute
disk0
fordisk1
. You should enter these commands from the bootable USB backup clone of your boot drive.Before entering type above commands, make sure your
start
andsize
entries are 40 and 409600, respectively. If not, make the appropriate corrections to the-b
and-s
options.