MacOS GPT Messed up File System (‘FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF’)

bootdisk-utilitymacospartitionrecovery

I had tried dual booting Linux and macOS, and when I rebooted my computer the OS volume shows as type 'FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF'.

I tried following OS volume shows as type 'FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF' but I think I'm doing it wrong/making it worse. I did not have a recovery partition, I did have an empty bootcamp partition ~130gb, and I believe it was macOS Catalina on APFS.

enter image description here

I had played with the partitions a lot, this is what it looks like now.. Probably not correct.

I had played with the partitions a lot, this is what it looks like now.. Probably not correct.

How can I get back at least the data from my Mac partition?

Best Answer

The first partition (the EFI partition) is mislocated. It should start at block 40 and end at block 409639 (=moved by 6 blocks towards the end of the disk).

In Recovery Mode you can simply remove the first partition and add it again properly aligned:

gpt remove -i 1 /dev/disk0
gpt add -i 1 -b 40 -s 409600 -t C12A7328-F81F-11D2-BA4B-00A0C93EC93B disk0

This apparently(?) solved the problem and the Mac booted again properly.

To verify the integrity of the APFS container afterwards enter:

diskutil list #to get the device number of the APFS container scheme device (probably disk1)
diskutil verifyVolume disk1

The result should be: Storage system check exit code is 0!