I wanted to delete all my partitions and merge all the space to the Macintosh HD but I made a mistake by taking the Macintosh HD volume out of the physical storage list. I don't know what happened:

Disk Utility

enter image description here

enter image description here I just want to delete all the space that's not in the Macintosh HD and merge all the free space too.


1 Answer 1


After trying to reboot, your main partition (disk0s2) won't be recognized as APFS container because the partition type is wrong (FFF...) and consequently your Mac won't boot to the login screen.

You have to boot to Internet Recovery Mode and remove the Apple_Boot volume (now disk0s4 - after a reboot probably disk0s3), repair the partition type of disk0s2 and finally expand the APFS container.

Under certain circumstances SIP has to be disabled to modify the GUID partition table.

  • Boot to Internet Recovery Mode (or a third party drive).
  • Open Terminal in the menubar Utilities > Terminal
  • Get an overview with diskutil list
  • Get an overview of your internal disk with the disk identifier found in the previous command. Below I assume the disk identifier of your internal disk is disk0 (SSD) (replace it with the one you have found in your environment).

    gpt -r show disk0
  • Remove the 134 MB "Apple_Boot" partition:

    diskutil eraseVolume "Free Space" %noformat% /dev/disk0s3
  • Unmount disk0 with diskutil umountDisk disk0
  • Then remove and re-add the second partition with the same size but proper type (APFS):

    gpt remove -i 2 disk0
    gpt add -i 2 -b 409640 -s 774363776 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk0
  • Verify disk and volume:

    diskutil verifyDisk disk0
    diskutil verifyVolume disk0s2
  • Expand the APFS container to fill the free space.

    diskutil apfs resizeContainer disk0s2 0
  • Verify disk and volume:

    diskutil verifyDisk disk0
    diskutil verifyVolume disk0s2
  • Do I need to do a backup of my data before? Feb 16, 2018 at 15:21
  • @FacundoSchiavoni It's always recommended to have a current backup! The commands above aren't critical though!
    – klanomath
    Feb 16, 2018 at 15:23

Not the answer you're looking for? Browse other questions tagged .