Guide on how to (re)add your Hackintosh Partition as a boot option to your BIOS, ie. how to modify your boot configuration - the UEFI NVRAM entries - if your partition is not present in the boot options (after a BIOS update e.g) [OC and Clover]

Guide on how to (re)add your Hackintosh Partition as a boot option to your BIOS, ie. how to modify your boot configuration - the UEFI NVRAM entries - if your partition is not present in the boot options (after a BIOS update e.g) [OC and Clover]

Prolog (non-essential)

Today I had the fantastic idea to update my BIOS my perfectly running Hackintosh machine (DualBoot). I flashed the 7B85v1B BIOS of my B450 Carbon Pro with the new 7B85v1C2 Beta. While the installation of said BIOS went smooth, it reset (of course) all my BIOS settings and - to my suprise - seems to have whiped my UEFI NVRAM. I realised this when my machine wouldn't boot into Hackintosh (the first Boot option) anymore, but straight into Windows (the second Boot option). Naturally I went into the BIOS to change this, but there was no other Boot Option than Windows. So I paniced, did dumb stuff (resets) and wasted seven hours figuring out a solution for this not very grave problem. The solution is actually quite obvious and known, but it was hard to find a solution if you don't have a clue on what to search for and are not that experienced with the BIOS/UEFI. Also there doesn't seem to be a OC version of this solution, so I'm hoping that the search engines' crawlers will lead you to this guide.

The Problem

The BIOS does not show the Hackintosh Partition as a Boot Option after having worked and booted perfectly. Why this is happend does not matter (maybe a CMOS and/or NVRAM reset), but let's say it is because you updated your BIOS too and now your previously perfectly working Hackintosh isn't recoginsed as bootable partition anymore. This can also help you, if you actually want to update your BIOS.

The Solution

TL;DR go the bottom of this post and/or visit the next link.

This will focus on OpenCore, if you are here for a Clover machine, I'd refer you to this. All credit goes to that post as all the steps below are from there, but I'll be a little bit more specific here. So maybe even Clover People can follow the steps below, but apply the changes according to said post.

  • So you want to update the BIOS of your perfectly working machine? Don't, if you are not 100% sure, that you will greatly benefit from it. Back up your machine and any sister partition. Do not flash the BIOS before you have created a OC stick with OpenShell.efi on it (see below).

OR

  • You have encounted the problem above and don't know what you can do.

1) You'll need your OpenCore stick (with OpenShell.efi on it) that you hopefully still have, like every good Hackinthosher. ;) If you don't have one anymore, you'll have to create one again. Make sure to include OpenShell.efi from EFI/OC/Tools/ of the OpenCorePkg, like here. You might need a second machine to do this.

You might not have to do create a or alter your existing stick if you...

  • can access your Hackintosh Partition from a Windows (or Linux - not featured in this guide; google a Linux alternative for "Hasleo EasyUEFI" - see at the bottom), or
  • are sure that your BIOS UEFI Shell features the bcfg command. This is also the case if you already have a OC stick that does not contain OpenShell.efi. Skip to Step 6) in this case. Eventhough my BIOS' Shell is the same Shell version as the Shell of my OpenShell.efi, it doesn't have this command, so you might want to include it anyway.

2) Connect the OC stick to your system. Cool, with this stick you can gain access to your system, if you want to backup or something. It is very unlikely that this procedure will damage anything, but safe is safe.

  • People who are here to update their BIOS, can do that now. Maybe disconnect the OC stick before updating. And maybe write down your most important BIOS settings first as they are likely to be lost with the update.

3) Boot into your BIOS (spam del or F11 or the key specific to your motherboard). I'm fairly sure that multiple settings are back to default, else you probably would not encounter said problem.

  • If everything is in order in your BIOS, I'd advise you to read this before proceeding!

Optimise your BIOS settings for your Hackintosh: I disabled "Fast Boot" and "CSM" [UEFI instead] and enabled "EHCI/XHCI Hand-off" as well as "Above 4G decoding". (This might differ for you!) If you don't do this, your Hackintosh will proably not boot. Do other changes as you like. Save your changes and reboot.

4) Boot into your Hackintosh via the Stick and open Terminal:

  • If your Hackintosh gets stuck on boot, but has worked normally before all of this, you have probably forgotten to change something in the BIOS. See here.

Enter into Terminal

diskutil list 

This will show you all the partitions available. Look for the Device Node of the one that houses your Hackintosh's EFI (not the OC stick, though!). Note this partition's Device Node in the form of disk_s_. For me it is disk0s1 (the same EFI partition that my Windows uses). (If you are not sure which partition it is, you can mount any partition with sudo diskutil mount /dev/disk_s_.) According to your findings enter into the new line of Terminal:

diskutil info disk_s_ 

This will return something like this:

https://preview.redd.it/4cioltkjgd551.jpg?width=2977&format=pjpg&auto=webp&s=5a91edb1ca9e1abba4374c4d569de99e82cfb5c6

Now, keep the Partition UUID in mind for the next step. I is probably enough tomemorise a few digits of this number (e.g. ...96250), but maybe take a photo.

5) Get familiar with OpenCore Booting. (Just to know why you are doing this.) Reboot again into said Stick, but stop at the OC Boot Picker where your Hackinthosh Partition shows up! Choose OpenShell.efi with the arrows and enter.

https://preview.redd.it/d70f13xehd551.jpg?width=2949&format=pjpg&auto=webp&s=312a3580b742cbeb9e0ef72660ebf3ed15b03eda

6) Get familiar with the bcfg command; just to understand what you will be doing. To make the following easier, you might want to unplug the OpenCore Stick at this point. Now enter into the appeared shell:

 map 

This will show you all partitions again:

https://preview.redd.it/b76ocvezhd551.jpg?width=3584&format=pjpg&auto=webp&s=05517d96e30ae2224a13db340433c0b40a645c1c

Note, that you can always enter cls to clear the screen of all the information. You can go up and down with page up and down on your keyboard. You can navigate your command history with the up and down arrows.

You are on the look for your EFI partition. In my case above it is the one ending on ...96250, so FS0. Memorise the FS__ of your EFI partition and enter

bcfg boot dump 

This will show you the current boot configuration with all the UEFI NVRAM entries. In my case this was empty, but it doesn't have to be in your case!

https://preview.redd.it/or67a9kfjd551.jpg?width=2267&format=pjpg&auto=webp&s=d58f5988ab0f9771539b07a542f70b4efcea79d5

If there are entries, look at the option number of the (furthest down) entry with the highes option number. Add 1 to this number and memorise it. If there is no entry, memorise 00. In the example below there is already one entry with the option number 00. The number to remeber here is 01. (Note, that there are ways to alter this sequence and even remove entries.)

https://preview.redd.it/pqsbdsrkkd551.jpg?width=3431&format=pjpg&auto=webp&s=624bedc2622883c4ec4165b660b47489c8e11dfa

Now enter into the new line of shell:

bcfg boot add NN FS_:\EFI\BOOT\BOOTx64.efi XXXX 

where

  • NN is the option number of your highest boot config entry +1; in my case 00.
  • FS_ is the FS_ number of your EFI partition; in my case FS0.
  • XXXX is a custom name you want to give this Boot Option; in my case Macintosh.

So, my command is: bcfg boot add 00 FS0:\EFI\BOOT\BOOTx64.efi Macintosh:

https://preview.redd.it/2xovs6bpmd551.jpg?width=3190&format=pjpg&auto=webp&s=5be155f90430076a6c4fb018558805be7ca3963e

Shell will confirm your command like above if everything went smooth. If there is a problem, check your command and try again. Note, that you must point the BIOS to BOOTx64.efi, not to OpenCore.efi in EFI/OC/! I did that mistake...

Now, let's confirm your boot configuration with

bcfg boot dump 

This should show the previously shown boot options with your new one at the bootom (highest number). For me this is the one entry (Windows doesn't seem to need an entry here...):

https://preview.redd.it/7okblmjmnd551.jpg?width=3449&format=pjpg&auto=webp&s=a264d7ccd8d9efdd4ac49b6b00692afb43d7d512

7) Wonderful. With that you are finished. Reboot with the reboot button of your case. Disconnect the OC stick, if you haven't already. If you want you can now go into your BIOS. Your Hackintosh Partition should show up as boot option again. If you have multiple operating systems, you may want to change the boot order. In my MSI BIOS, this can be done in the UEFI Hard Disk Drive BBS Priorities. Here I can also disable unwanted boot entries:

https://preview.redd.it/6g6mczovpd551.jpg?width=3631&format=pjpg&auto=webp&s=44a69890dc9815815335cdbd16b3f1403bf43219

That's it. Hope this helped and solved your problem.

Windows software solution

There is a software solution to this problem (there are probably a few applications that can do this): https://www.easyuefi.com/index-us.html. The trial version is free and does a good job. This could be an easy solution for people on DualBoot. For everyone else, I believe the above is faster, especially if you have a OC stick at hand; I also consider the above more elegant... Nevertheless here are some screenshots of the application:

Only the Windows EFI partition is present as a Boot Option (\"Hard Drive\" is an empty entry).

A new Boot Option is created pointing to EFI/BOOT/BOOTx64.efi. Note, that the partition is the same as for the Windows OS.

Boot config after the modification. First Mac, then Win. Upon reboot the system natively booted into Windows again, though. But the Boot Option for the Hackintosh was visible in the BIOS thereafter and could be set to be the first there.

There are probably other applications to do this, and probably some for Linux; maybe even one for Hacintosh?

TL; DR The Solution

  • Have or create a OpenCore stick with OpenShell.efi on it.
  • Boot into your Hackintosh and back up, if you can (also other machines).
  • (Update your BIOS if your here for that.)
  • Connect the OC stick to your system.
  • You will be finished in 10 minutes.
  • Boot into your BIOS to optimise your BIOS settings for your Hackintosh: I disabled "Fast Boot" and "CSM" [UEFI instead] and enabled "EHCI/XHCI Hand-off" as well as "Above 4G decoding". (This might differ for you!) Save and reboot.
  • Boot into your Hackintosh and open Terminal to enter diskutil list
  • Get the Device Node of the partition that houses your Hackintosh's EFI (not the OC stick, though!) in the form of disk_s_. Take a photo of it's Partition UUID displayed with diskutil info disk_s_
  • Reboot again via Stick, but stop at the OC Boot Picker. Choose OpenShell.efi.
  • Maybe disconnect the OC stick to make the following neater and enter into the appeared shell: map
  • Compare to your photo and memorise the FS__ of the corresponding partiton. (=A; e.g. FS2).
  • Enter bcfg boot dump to see the current boot configuration.
  • If the is no entry memorise 00. If there are some, memorise the highest option number +1. (=B; e.g. 03 with 00, 01 and 02 present).
  • Enter bcfg boot add NN FS_:\EFI\BOOT\BOOTx64.efi XXXX, where NN is B (e.g. 00), FS_ is A (e.g. FS0) and XXXX is a custom name you want to give this Boot Option (e.g. Macintosh).
  • Check your work with bcfg boot dump
  • Reboot, disconnect the OC stick and maybe change the boot order in the BIOS.
submitted by /u/CrayCJ
[link] [comments]