A few months ago someone installed Linux on my computer using rEFInd for a project. I am using a 2015 13" Macbook Pro with 256GB SSD. The partition for linux was made to be 60GB. After the project I somehow deleted rEFInd and completely forgot about the rest.

A few days ago I noticed that I had only 190GB of fully usable space and remembered that Linux was probably still there. After trying to use diskutil I thought deleting the Linux partition and resizing the Apple AFS partition everything would work. But sadly after deleting it,the partition with my data on had type FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF on my main bootable drive. Now after restarting my computer I get a black screen followed by GRUB Minimal Bash screen.

After following instructions on Data Not Backed Up, Partition Type: FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF I tried the commands to change my partition type to a normal OS-X partition. After doing that verifyDisk didn't give me any problems but verifying that volume returned

Error: -69845: File system verify or repair failed. 
Underlying error: 8: POSIX reports: Exec format error 

These are the photos of $ diskutil list and $ gpt -r show disk0.

enter image description here enter image description here

I'm not the most knowledgeable when it comes to commands like this so any help is appreciated. I have important data on the disk that I hope is not erased and won't be erased that is not backed up anywhere else.


After looking through more threads I found my own problem. The type for my partition was supposed to be APFS so by using the previous solution with the correct type as in

diskutil umountDisk disk0
gpt remove -i 2 disk0
gpt add -i 2 -b 409640 -s 372637568 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk0

Now I did come across a problem at first because diskutil verifyVolume disk0s2 gave me Unrecognized file system (-69846) I did not mind it and tried to reboot after NVRAM reset and I was able to boot back to my Macbook as I did before with no loss in data. After that I used the command :

diskutil apfs resizeContainer disk0s2 0

in order to be able to use the memory from erasing my linux partition. Hope this helps someone.

  • The reason for the Unrecognized file system (-69846) error probably was: the sw_vers of the recovery system was 10.12 or lower (=an old recovery system not capable dealing with an APFS container)!
    – klanomath
    May 13 '20 at 0:15
  • Makes sense, thanks a lot by the way, your answers helped me a lot. May 13 '20 at 6:28

You must log in to answer this question.

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