mac: OLCP stuck on boot after root patching and MBP 2014

OK, I’ve been using Opencore Legacy Patcher for a few months now and it has been working well, but the big issue has been updating it and rebooting. There is a step called root patching where the boot drive gets kernel extensions in /Library/Extensions and on reboot these can fail.

I had in the past had to rebuild the entire thing, but thanks to the Discord channel, I discovered this fix which solved the problem. It involves deleting the offending kext that is causing the boot to fail in the middle of the startup bar.

The solution is in a nutshell:

  1. Boot the system up and have the USB key that you used to install OLCP, this should boot fine assuming that what is happening is that you installed root patches (kernel extensions) on your main disk and these are hanging
  2. If you are using FileVault 2 (the disk encryption), then go to the Disk Utility and mount the partition called Data. You will see the name of your main disk and then a Data piece, mounting it will require a password (which hopefully you remember, for me, it is the password of my main user account and no, I don’t understand how that user account is associated with the hard disk).
  3. When you boot it, you will see the Recovery windows, and here is the unintuitive part, choose Utilities > Terminal at the top menu, it is not one of the items in the main part of the screen
  4. In the terminal, you need to first mount the main hard disk, typically called “Macintosh HD”, but if you rename it use that name with mount -uw "/Volumes/Machintosh HD
  5. Now you revert the snapshot of the main drive that didn’t work with bless --mount "/Volumes/Macintosh HD" --bootefi --last-sealed-snapshot. I had never heard of bless before this, but this writes information to a disk volume saying it is bootable, copies boot.efi which is the magic file in a blessed volume that the system reads when it starts into magic location /System/Library/CoreServices/boot.efi. For non-T2 Macs, this had to be on a special disk /dev/disk1s2 so there is a lot of magic. The –bootefi means work on that special drive and –last-sealed-snapshot means that you are reverting backward as you can have different versions of what is on that drive.
  6. Now comes the magic, /Volumes/Macintosh HD/Library/Extensions and you have to delete all the kext files except for HighPoint* and SoftRAID.kext
  7. Now restart and it should work

Reminder on MacOS boot commands

The big thing to remember all all the magic keys for rebooting which are for Intel Macs:

  1. Reset the PRAM. Command-Option-P-R for Intel Macs resets the boot options.
  2. Command-R puts you into recovery mode
  3. Command-S puts you into single-user mode where you get just a command line window
  4. Option key to get the Startup manager so you can pick which boot drive (for instance if you have a USB key that is bootable)
  5. Shift key put you into safe mode where you can diagnose things
  6. D. Puts you into the diagnostic utility
  7. T. For those macs that support it, turns the entire Mac into a hard drive, so at least you get things out
  8. Ctrl-V. Verbose mode to try to figure out where things are handing

Apple silicon Macs have far fewer things, basically one, when you boot, hold down the power button while it is booting and it will give you startup options and other options under the gear icon (and from there get to Recovery mode, etc.)

Still have problems with MacBook Pro 2014 even after dGPU disabled

OK, here is another strange thing, I’ve been trying to make my MacBook Pro 2014 with an Intel Pro and an nVidia 750 discrete GPU. From work on my MacBook Pro 2010, I know there is a nvram command that disables the dGPU

However, when I run this command on my MacBook Pro 2014 with Crystal Well, instead I disable the integrated GPU (which is pretty weird). Safari and Photos still don’t work so Metal emulation is broken and the graphics on the Mac are not enabled when I plug a screen in. Net, net, I think that options must be reversed on this machine. Sigh. I set it to %01 to disable it seems to be reversed on 2014, it is hard to say because I found but can’t find anymore what the magic parameters had what do any of these fields mean?

It does look like getting both graphics card again is done by setting this magic to zero:

nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%00%00%00%00

The other thing is to just reset the PRAM and there is a rumor that sudo pmset -b gpuswitch 2 works

What the heck is nvram?

It stands for nonvolatile RAM where key parameters are kept and where you can:

  1. nvram -p this print out all the nvram parameters
  2. nvram -c clears all the parameters
  3. nvram -d _variable name will delete a variable
  4. nvram _variable_=_value_ to set a value

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

I’m Rich & Co.

Welcome to Tongfamily, our cozy corner of the internet dedicated to all things technology and interesting. Here, we invite you to join us on a journey of tips, tricks, and traps. Let’s get geeky!

Let’s connect