macOS Missing Partition (APFS)

From LogiWiki
Jump to navigation Jump to search

macOS Missing Partition (APFS)

APFS, missing macOS partition, replaced with FFFFF-FFFFFFF-FFFFFFFFF

This was a prevalent issue with early macOS High Sierra Upgrades. If High Sierra fails to convert MacOS Extended Journaled (JHFS+) to APFS, the GUID of the macOS Partition will read FFFF-FFFFFFF-FFFFFFF. To fix this, you will have to manually rebuild the GPT.


The proper GUID of APFS partitions is 7C3457EF-0000-11AA-AA11-00306543ECAC.


The default pMBR was replaced with an old-style MBR, probably by the Linux installation, BootCamp, or failed macOS Extended Journaled to AFPS Conversion during macOS Upgrade.


To get your APFS partition back remove partition disk0s2 and restore it with the proper type:

  • Boot into Recovery, Open in the menubar > Utilities > Terminal
  • get some details by entering into Terminal:
diskutil list #below I assume the disk identifier of the internal disk is disk0
gpt -r show disk0
  • Unmount disk0:
diskutil umountDisk disk0
  • Remove and restore the 2nd partition:
gpt remove -i 2 disk0
diskutil umountDisk disk0
gpt add -i 2 -b 409640 -s 372637568 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk0
  • Verify disk and partition:
diskutil list
diskutil verifyDisk disk0
diskutil verifyVolume disk0s2


Your Mac should be able to boot despite the MBR.

If you had BootCamp installed and want (or have) to restore the pMBR because the MBR is stubborn/blocks the modification of the partition table do the following:

  • Get all disk details:
diskutil list #below I assume the disk identifier of the internal disk is disk0
gpt -r show disk0
  • Replace the GUID partition table:
diskutil umountDisk disk0
gpt destroy disk0
gpt create -f disk0
  • Re-add all previous partitions visible in the last gpt -r show disk0 output:
gpt add -i 1 -b 40 -s 409600 -t C12A7328-F81F-11D2-BA4B-00A0C93EC93B disk0
gpt add -i 2 -b 409640 -s 372637568 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk0
gpt add -i 3 -b 373047208 -s 262144 -t 426F6F74-0000-11AA-AA11-00306543ECAC disk0
gpt add -i 4 ...
gpt add -i 5 ...
  • If you get a resource busy error after one of the steps, just unmount disk0 again with:
diskutil umountDisk /dev/disk0
  • Finally verify disk and partitions:
diskutil list
diskutil verifyDisk disk0
diskutil verifyVolume disk0s1
diskutil verifyVolume disk0s2
diskutil verifyVolume disk0s3
#disk0s4 & disk0s5 can't be verified with the default macOS tools because the latter is a Linux swap and the former a Linux partition, probably with ext4