Tuesday, January 16, 2024

OpenCore root patch boot hanging

 I've had a few older iMacs running macOS versions that are not officially supported by using OpenCore bootloader patcher. They've been running Monterey and Ventura very well with only a couple of non-critical quirks.

However one issue came up since coming back from winter break: a Ventura iMac was hanging on boot, just stuck on the Apple logo. A bit of investigating revealed it was a root patch applied before the break. These root patches are handled automatically by OpenCore, usually in response to macOS updates or code revisions. This time, the root patch didn't handle the graphics update properly (Metal) so it couldn't boot properly.

To revert, boot from a recovery disk and open a Terminal prompt. Find your install volume:

ls /Volumes

then mount:

mount -uw "/Volumes/VOLUMENAME"

revert the snapshot:

bless --mount "/Volumes/Macintosh HD" --bootefi --last-sealed-snapshot

list installed extensions:

cd "/Volumes/Macintosh HD/Library/Extensions" && ls

I had to remove the IntelHD5000.kext and IntelFrameBufferAzel.kext (rm -rf "kextname") 

On successful reboot DO NOT re-apply any root patches. Instead, go to Apple's Developer Download Page and download the Kernel Debug Kit that most closely matches your macOS version. I think when I applied my root patch the first time it didn't download the debug kit properly and applied the wrong kext extensions.