Jump to content

[GUIDE] How to update Clover for BigSur compatibility (and beyond) using OpenRuntime and Quirks (r5123+)


5T33Z0
82 posts in this topic

Recommended Posts

Latest Update: September 18th, 2021. Guide is applicable to: Clover r5123 to r5139+ (UEFI only)

 

Background: Since the Pre-Release of Clover r5123, OpenCore's Memory Fixes have been integrated completely into Clover in the form of OpenRuntime.efi, replacing the previously used AptioMemoryFixes. Since r5126 these are now obsolete and no longer supported, so an upgrade to r5126 or later is mandatory in order to be able to install and boot macOS Big Sur and Monterey with Clover!

 

Aim: This guide is for everyone trying to update to the latest revision of Clover, so they can install and run Big Sur and newer on their machines. When updating to the latest revision of Clover, there are several obstacles one might face along the way. This guide is here to assist users in trying to make the switch from the "old" Clover with AptioMemoryFixes to the new one with Open Runtime and Quirks (make sure to update Clover Configurator to the latest version as well).

 

Problem: If you update your existing Clover installation by installing the clover.pkg file like you used to, this will most likely result in an inoperable bootlader due to missing boot parameters in the config.plist.

 

Approach: In order to avoid the dilemma of your system not wanting to boot, you have to know that the following files are obsolete and are no longer necessary, so they should either be deleted when updating Clover from a built prior to r5123 or omitted altogether when setting up a new EFI Folder:

  • AptioMemoryFixes: AptioMemoryFix.efi, OsxAptioFix3Drv.efi, OsxAptioFixDrv.efi and everything else containing "memoryfix".
  • Unnecessary Drivers (for UEFI-based Systems):
    • DataHubDxe.efi DataHub protocol which provides parameters like OEM Model, FSBFrequency, ARTFrequency, Clover's boot-log and many other things to macOS which it cannot obtain otherwise. It has been fully integrated into Clover since r5129, so delete it. Newer versions of the Clover Package don't contain this driver anyway.
    • EmuVariableUefi.efi – necessary for emulating NVRAM, if it is not available (legacy systems) or working incorrectly.
    • FSInject.efi – For Kext injection. Necessary only for legacy versions of macOS ≤ 10.7 (Lion) which are capable of loading individual kexts instead of prelinkedkernel. Fully integrated in Clover nowadays, so delete it.
    • OcQuirks.efi and OcQuirks.plist – delete if present. OcQuirks is a relic from earlier attempts to include OpenCore Booter Quirks into Clover up until r5122.
    • SMCHelper.efi – Necessary when using FakeSMC.kext. If you use it in combination with VirtualSMC.efi, it can cause instant Kernel Panics. In other words: VirtualSMC + VirtualSMC.efi = good; FakeSMC + SMCHelper.efi = good; any other combination = bad. Nowadays, using VirtualSMC.kext alone is sufficient and recommended.

  • Kexts:
    • Outdated, incompatible and/or duplicate Kexts (and variations thereof) can cause boot crashes, kernel panics and general system instability. Therefore, you should always keep yout kexts up to date for maximum compatibility with macOS and Clover! You can use Kext-Updater to download the latest kexts and other Bootloader-related files.
    • If you are using a lot of Kexts (usually on Laptops), have a look inside of them (right-click and select "show package contents") to check if they include additional kexts (as "Plugins") and make sure that no duplicates exist in the "kexts" folder – Kexts for HID, WiFi and Bluetooth come to mind.
    • If you get panics you can not isolate, move all non-essential kexts to the "off" folder temporarily to work around the issue by starting with a minimal set of Kexts to get the system running. Once it runs, put the disabled Kexts back one at a time, reboot, and repeat until you to find the culprit for the panic and look for a solution (verbose mode is your friend). Here are some examples of Kexts I've experienced issues with when updating:
      • VoodooPS2Controller.kext: can cause Kernel Panic if one of it's Plugins (VoodooInput.lext, VoodooPS2Mouse.kext, VoodooPS2Trackpad.kext and VoodooPS2Keyboard.kext) is also present at the root level of the "kexts" Folder.
      • AirportBrcmFixup.kext: this Kexts contains 2 Plugins, AirPortBrcm4360_Injector and AirPortBrcmNIC_Injector.kext. When using AirPortBrcmFixup, you are  supposed to use only one of these plugins, not both! Using both can cause the boot process to stall indefinitely. On top of that, AirPortBrcm4360_Injector is not supported by macOS Big Sur and has to be disabled anyway. In OpenCore, you can just disable a Kext in the config. Since the Clover config does not support to take control of the kext loading sequence, you have to delete it from the Kext itself (right click on AirportBrcmFixup, select "Show package contents" > "Plugins").
      • BrcmPatchRAM and a bad combination of it's accompanying kexts can cause issues as well. Don't use BlueToolFixup.kext and BrcmBluetoothInjector.kext together. Former is needed for enabling Bluetooth in macOS Monterey where the latter is used in earlier versions of macOS.

 

Updating your EFI

  1. Prepare an USB Stick. Format it to FAT32 (MBR). We'll use it for testing our updated EFI Folder first, before copying it to the ESP on the HDD.
  2. Download the latest Clover Release  as a .zip archive for a manual update: https://github.com/CloverHackyColor/CloverBootloader/releases
  3. Extract the .zip. We'll create our EFI Folder based on the one inside of it.
  4. Have a look at "EFI > Clover > drivers > off > UEFI" and it's sub-folders. Inside of them, you will fibd the following Files:2138534172_CloverDrivers.thumb.jpg.9a71326c91b5d32edd3e10eadb8194a7.jpg
  5. Copy the following files over to EFI > Clover > drivers > UEFI: ApfsDriverLoader.efi, VBoxHfs.efi (or HfsPlus.efi, which is faster) and OpenRuntime.efi
  6. Now we have a minimal set of Drivers (see screenshot below). Files tagged in gray are in the "drivers" Folder by default and are most likely unnecessary for UEFI-based systems. I would move them into the "off" folder one by one to disable them and check if the system still boots from the USB stick without them. AudioDXE.efi is only needed for playing back audio files like boot chimes - so if you don't use any, you can delete it. As mentioned earlier, SMCHelper MUST be deleted when using VirualSMC.kext!
    2130302593_Bildschirmfoto2020-11-17um19_44_49.png.2c1032a8f12f39774ebeddf6e92f1f30.png
  7. Next, copy over your kexts (updated to the latest available version, of course), your ACPI > patched folder and your config.plist form your existing EFI Folder
  8. Open Clover Configurator and update it to the latest Version. It should now include a new section at the bottom called Quirks, as mentioned earlier
  9. Now open your config.plist you copied over from your working EFI and click on "Quirks". It should look like this (without the descriptions of course):
    Quirks_en.thumb.png.c64d581ecb16079b3d223fb5fd77cc7d.png
  10. Head over to the OpenCore Install Guide and pick the guide for your CPU Family and Platform.
  11. Jump to the "Booter" Section. It contains all required Booter Quirks tinted green in the screenshot. Make sure to unfold the "more in-depth info" box to see what they do. Find the options for your system and tick them away in Clover Configurator.
  12. Next, jump to the "Kernel" section of Dortania's guide and copy over the settings from "Quirks" and "Scheme". Again, make sure to unfold the "more in-depth" section to find all necessary settings. NOTE: some of the settings Located in "Kernel > Quirks" have different names and are located in the "Kernel and Kext Patches" section of Clover Configurator. These include:
    1704231663_KernelQuirksother.thumb.png.5717d3418c3d9c1ba5be08e1392d8842.png
    In most cases you have these set up correctly already, otherwise your system wouldn't have started before. But it's good to double check if you have settings enabled which may be unnecessary.
  13. Once you've ticked all the necessary quirks, save your configuration, copy the new EFI Folder to the root of your USB Flash Drive and try booting from it. If everything was set up correctly, the system should boot as expected.
  14. In the Clover Boot menu, perform an NVRAM Reset (F11) to clean out possible remnants of previous Aptio Memory Fixes and then start macOS.
  15. If it does boot, you can mount the ESP partition of your hard drive, backup your ole EFI Folder, delete it and put in the one from your USB Flash drive to make the changes permanent.

 

VALIDATING YOUR CONFIG and FIXING ERRORS:

Starting from version r5134, Clover now includes error reporting similar to OpenCore which displays configuration errors before the actual boot menu appears. Do the following to validate your config and fix configuration errors:

  • Download CloverConfigPlistValidator.zip contained in the Assets of the Clover release: https://github.com/CloverHackyColor/CloverBootloader/releases
  • Unpack it
  • Open Terminal
  • Drag CloverConfigPlistValidator into it and hit the right arrow key once, so the file path is no longer highlighted
  • Next, drag and drop your clover config.plist into the terminal window. Make sure there is a blank space between the 2 file paths
  • Hit "Enter"
  • Check the results. If it says: "Your plist looks so wonderful. Well done!", then you don't have to do anything else.
  • If there are errors shown in the log, open both your config.plist and the config-sample.plist included in the Clover download – preferably in a plist editor. Look for any differences (like formatting, deleted features, etc.) and fix them
  • Save your config
  • Re-check for errors
  • Repeat comparison, fixing, saving and re-checking until all issues are resolved

 

FURTHER RESOURCE AND TROUBLESHOOTING:

Good luck!

 

PS: If you run into trouble after following this guide you can upload your config.plist and I can have a look at the quirks.

PSS: When running Big Sur, you need to remove the PreBoot Volume from the "Hide" Section of the GUI because if I understand correctly, Big Sur requires booting from it.

PSSS: if your system boots correctly you can upload a screenshot with your quirks with additional Info like your Board and CPU which might be helpful for other users.

Edited by 5T33Z0
Updating guide
  • Like 14
  • Thanks 5
Link to comment
Share on other sites

Hello there,

I was planning to install Big Sur on my Lenovo desktop hack, and tried this conversion guide.

In terms of usability, clover 5126 doesn't boot my Big Sur installer (maybe expected) nor my current Catalina installation.

It stops at

rooting via boot-uuid from /chosen 

I attach my config.plist (without SMBIOS section).

 

System on my signature

 

 

config.plist

Link to comment
Share on other sites

Hi, 

It's a Skylake desktop.

I have so many boot args because I needed all of them when I first installed my system back in 2016 (I was trying some betas too, because of that I have beta args). Maybe I could retire some of them. 

I'm gonna try your changes as soon as possible. Maybe I could try that tomorrow.

Thanks 

 

Link to comment
Share on other sites

@pepitillo Here you go.

 

Changes: Followed Clover Vanilla Dektop Guide for Skylake to update config. Followed Dortania OpenCore Guide for checking Quirks.

 

• Cleaned out ACPI Section and deleted ACPI > Original Folder to slim archive

• Trimmed Boot-Args

• Disabled USB Port Limit Patches for older OSes. Added patches for Catalina

• Quirks: disabled XCHI Portlimit since USBPorts.kext is present

• Deleted Bluetoothfirmware kext for uploading (15 mb) to slim archive. You have to put it back in!

• Removed FakeSMC in Favor of VirtualSMC. Deleted SMCHelper as well > incompatible with VirtuaSmc

• Replaced VoodoooTscSync with CpuTscSync.kext > It's the new version of this kext

• Removed unnecessary Folders

 

Good Luck

 

EFI_pepitillo.zip

  • Like 1
  • Thanks 2
Link to comment
Share on other sites

On the weekend I tried to build clover for my current desktop as well with all the necessary settings taken over from my working OpenCore config and I got stuck as well. The "[EB LOG:EXITBS:START]" error seems to be an issue with the 5126 release: https://github.com/CloverHackyColor/CloverBootloader/issues/309

Edited by 5T33Z0
Link to comment
Share on other sites

Hi, some updates.

I was trying to build an opencore config for my computer based on opencore guide. I'm stuck on the same place as stuck in clover.

rooting via boot-uuid from /chosen

So there's something with Opencore rater than Clover integration.

Link to comment
Share on other sites

23 hours ago, pepitillo said:

Update

I can successfully boot opencore by setting ReleaseUsbOwnership to true.

IDK if this is possible in Clover, I'll try later.

 

The Feature is called "FixOwnership" in Clover. Have a look at the Clover Conversion Guide to see what's what in Clover/OC

 

https://github.com/dortania/OpenCore-Install-Guide/blob/master/clover-conversion/Clover-config.md

  • Like 1
Link to comment
Share on other sites

2 hours ago, ltooz_audis said:

Nice tutorial but I can't seem to get the clover to display the recovery boot partition, only Catalina and NOT Big Sur. Can yours show the recovery boot partition?

Thanks,

Louis

Clover doesn't support Big Sur Recovery boot till the moment, @Slice and @Jief_Machak are still working for more optimization and issues fixing 

  • Like 2
Link to comment
Share on other sites

@5T33Z0 Nice Tutorial!  Sharing my experience in case it helps others. I'm still running CLOVER r5122 (UEFI) and Catalina 10.15.7.03 as the baseline on my HackMini8,1 and was able to apply your suggestions as follows:

  • Removed FSInject.efi
  • Removed SMCHelper.efi (even though I am using FakeSMC.kext)
  • Keeping OcQuirks.efi (since I'm still on r5122)

I tried removing DataHubDxe.efi (since I think my rig is "modern"), but my system will not boot Catalina 10.15.7.03 without DataHubDxe.efi.

 

My CLOVER drivers are now limited to the following:

  • ApfsDriverLoader.efi
  • DataHubDxe.efi
  • NvmExpressDxe.efi
  • OcQuirks.efi (since I'm still booting with r5122)
  • OpenRuntime.efi
  • VBoxHfs.efi

I'm currently testing this reduced driver set with a USB (keeping my SSD EFI untouched) and will update my SSD after I confirm proper operation through a few boot cycles.

 

Thanks again!  Nice work.  

 

EDIT: Note that when booting with OC 0.6.3, I need only the following drivers (still using FakeSMC.kext):

  • HfsPlus.efi
  • OpenRuntime.efi
Edited by tonyx86
  • Like 1
Link to comment
Share on other sites

@tonyx86 Thanks for sharing your experiences. It's always a bit of experimenting involved. ApfsDriverLoader is included in OpenRuntime so you don't need it in OpenCore. As far as Clover is concerned, you could test if it will boot from apfs volumes without it. But I think it is still required though, since it looks like Clover is only making use of the memory fix portion of OpenRuntime.

Link to comment
Share on other sites

On 11/28/2020 at 3:07 AM, PippoX0 said:

I will give a try in my legacy rig

Legacy boot of Clover 5126 or 5127 can not boot Big Sur in my FX-6300, P6TSE, P5Q PRO, or GA 775 hackintoshs yet because these have no UEFI. Put OpenRuntime.efi in EFI/CLOVER/drivers/BIOS not working !

But legacy boot with OpenCore worked in these hackintoshs from 10.13.6 to 11.1 smoothly.

If yours can boot Big Sur, can you share your EFI for me ?

Edited by jsl2000
Link to comment
Share on other sites

On 12/10/2020 at 2:52 AM, 5T33Z0 said:

@tonyx86 Thanks for sharing your experiences. It's always a bit of experimenting involved. ApfsDriverLoader is included in OpenRuntime so you don't need it in OpenCore. As far as Clover is concerned, you could test if it will boot from apfs volumes without it. But I think it is still required though, since it looks like Clover is only making use of the memory fix portion of OpenRuntime.

I just performed the most recent Catalina 10.15.7 security update and Safari 14.0.2 updates on my HackMini8,1 and the updates were without issues.  I'm posting this as an added validation that my reduced CLOVER driver set (repeated below, still running CLOVER r5122 UEFI) is sufficient for normal Catalina 10.15.7 operation and for Catalina installers.  Thanks again for this thread.

  • ApfsDriverLoader.efi
  • DataHubDxe.efi
  • NvmExpressDxe.efi
  • OcQuirks.efi (since I'm still booting with r5122)
  • OpenRuntime.efi
  • VBoxHfs.efi

 

See new version screenshots here.

Edited by tonyx86
Link to comment
Share on other sites

  • 2 weeks later...

Yes @tonyx86 a kind reminder to everyone, NvmExpressDxe.efi is for older maOS's that don't natively support NVMe, we don't need this for Mojave and newer.

 

That's also my minimum EFI drivers except that I am an old-school guy and still use FSInject.efi and VirtualSMC.efi :D

There is still no conclusive evidence as to whether keep FSInject.efi and VirtualSMC.efi (instead of SMCHelper.efi that's for FakeSMC.kext) and digging on the net only provides some user's feedback rather some developers' insight (as they see the code that I cannot). Originally in older days, it was a "Driver responsible for Clover's /EFI/kexts/XXX kext injection into kernelcache". Not sure if it's now integrated in main CLOVERx64.efi ? Slice responded here but... 8 years ago. 

 

Perhaps they were indeed for older macOS and since High Sierra or Catalina, they too are no longer needed?

 

UPDATE:

As Slice reported today, FSInject.efi "is for 10.7 (Lion) and older systems which are able to load individual kexts instead of prelinkedkernel" so I also try booting without it on r5123-1 and I had no issues removing it.

Edited by MacKonsti
  • Like 1
Link to comment
Share on other sites

I have created a Clover EFI with r5127, with help of the guide given for big sur and added the necessary kexts, drivers and made the efi to match settings from my old EFI. I am on Pentium G4600,NVIDIA 710, Gigabyte HM110m-h mobo,  i was able to boot the macOS Catalina installer on r5122, but running big sur installer gives kernel panic -

panic cpu2 caller ...initproc exited --exit reason namespace 2subcode 0x4 description:none.

I gave the FakeCPUID 0x0306A0 in the config.plist with the help of clover configurator, added the FakePCIID.kext. Any help at the earliest is highly appreciatable.
I have been able to boot it using OpenCore but I wanted Clover as it helps me with my development process.

Link to comment
Share on other sites

  • 2 weeks later...

Quirks for Gigabyte Z490 Vision G. Should work with other Z490 Boards as well like the Vision D. Boards from other vendors may need "EnableWriteUnprotector" and/or "SetupVirtualMap". You still need SSDTs from OpenCore (like AWAC, SSDT-PLUG, SSTD-EC-USBX etc.).

 

1757102024_Z490VisionGQuirks.png.afa53ee42849062c58ad14b23b731672.png

 

Kernel & Kext Patches:

  • KernelPM (not necessary if you disable CFG Lock in BIOS)
  • Panic No Kext Dump
Link to comment
Share on other sites

  • Allan featured this topic
  • 5T33Z0 changed the title to [GUIDE] How to update Clover for BigSur compatibility (and beyond) using OpenRuntime and Quirks (r5123+)
  • Slice locked and unlocked this topic
×
×
  • Create New...