Mac Partition won't boot after Bootcamp Partition Resize

Solution 1:

The partition GUID of disk0s2 (DE94BBA4-06D1-4D40-A16A-BFD50179D6AC) is probably wrong. It designates the partition as a Windows Recovery Environment, which is the ugly stepsibling of macOS' recovery partition. Changing the GUID of a partition doesn't modify the volume format! A wrong GUID usually renders a partition unbootable though.

It's rather unclear how and why the GUID has been modified.

Depending on your (former) macOS system version it should be either the GUID of an APFS, a CoreStorage or an HFS+ partition instead. To detect the proper GUID for disk0s2, use the method described here. If you remember the system version the steps to detect the partition type outlined there are usually not required.

Here, the system of the broken boot volume is known (macOS 10.5 Catalina). Catalina's boot partition type exclusively is APFS.


Then the standard procedure would be:

  1. Boot to another boot device (either Internet Recovery/macOS Recovery (alt-cmd-R), another Mac (with the broken Mac attached in Target Disk Mode) or a thumb drive. Preferred system version: the same as the "broken" one. Below I assume you booted to Internet Recovery/macOS Recovery Catalina!
  2. Open Terminal and enter:

    diskutil list
    

    to determine the disk number of the internal disk of the "broken" Mac (below I assume it's disk0 - apply accordingly)

  3. Get the partition table with gpt:

    gpt -r show /dev/disk0
    

    Depending on the boot drive you have to prepend sudo and/or disable SIP here, if you want to execute gpt ...

    sudo is required if you boot to another Mac/thumb drive (sw_vers < 10.15) and using an admin account. sudo & disable SIP is required booted to another Mac/thumb drive (sw_vers >= 10.15) and using an admin account. Booting to Internet Recovery 10.15 doesn't require additonal steps.

  4. Unmount the broken Mac's internal drive/volumes

    diskutil umount disk0s3
    diskutil umountDisk disk0
    
  5. Remove the second partition

    gpt remove -i 2 /dev/disk0
    
  6. Unmount the broken Mac's internal drive/volumes

    diskutil umount disk0s3
    diskutil umountDisk disk0
    
  7. add the second partition with the proper GUID

    gpt add -i 2 -b 409640 -s 400390624 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk0
    
  8. Verify the disk and the volume

    diskutil list
    diskutil verifyDisk disk0
    diskutil verifyVolume diskXsY #use the proper diskXsY of the APFS volume in the diskutil list output