Dual booting Windows with Mac? Getting duplicate Windows Boot Manager boot entries appearing on every boot? Is your ASUS BIOS sometimes completely freezing on boot due to these boot entries building up (what a dumb bug!)? Eventually I got pretty fed up of unplugging every non-boot hard drive just to unfreeze the boot sequence, so I ventured to find a solution. After much research (there is a good thread over at tonymacx86) this is my write-up on the solution.. here goes!

tldr;

Some buggy BIOS implementations seem to freeze if it detects both the Windows EFI alongside Clover EFI on the same system.

So, rename the Windows EFI bootloader folder to something else, so that the BIOS doesn’t see it.

Then it will be forced to boot Clover only, and hopefully happy days ;)

my set up

This blog post is ‘anecdotal advice’. My set up is as follows… you can try match it but I can’t guarantee this will work for you.

  • I have a SSD for each Windows and MacOS. 
  • Keeping all bootloaders on a single EFS seems to help prevent the issue.
  • Remember that the EFS is a FAT32 partition on a GPT disk which can contain EFI bootloaders.
  • So I have placed both the EFI bootloaders for Windows and Mac together on a single EFS, which in my case is the EFS of Disk #1.
disk EFS partitions
Disk #1 Clover EFI as default bootloader + Windows EFI Windows OS NTFS
Disk #2 Left empty, don’t use! macOS HFS

FYI, tested on a ASUS z97k/CSM motherboard

Be prepared to get your hands dirty with UEFI bootloaders!

Step 1 –

a. Boot into macOS

b. mount the EFS partition

c. Use Clover Configurator to mount the EFS, or manually:

mkdir /Volumes/EFI/
mount -t msdos /dev/diskXs1 /Volumes/EFI/

Fun fact: If “for some reason” the partition identifier (number) of your EFI partition is not numer 1, you can use fdisk to fix the partition order.

Step 2 –

It appears that the AMI Aptio BIOS (or at least, this ASUS Z97K/CSM mobo) is hardcoded to search for the EFI/Microsoft/Boot/bootmgfw.efi path, and then adding it to the boot list if it finds that it is not the default bootloader - which is causing the redundant entries – Grrr!

d. Rename the Microsoft part to something else – I just prefixed it with MS-.

I recommend renaming the Windows EFI folder and not deleting it because it contains BCD boot stuff - a massive pain to restore!

Next, we should also deal with of the EFI/BOOT directory. I also prefixed it with MS- just in case I ever want to revert from my Hackintosh set up.

Warning: Whenever you wish to run bcdedit from Windows, or run Windows Memory Diagnostics, you’ll first need to restore the Microsoft folders back temporarily, then afterwards rename it back.

Step 3 – Install Clover EFI files

Download the latest Clover EFI Bootable ISO and mount the ISO. Copy the BOOT and CLOVER folders over to your EFI partition.

You should now end up the following:

At this point, re-configure your Clover config.plist, kexts, and drivers64UEFI. Copy a backup from USB (highly recommended to have one). Follow a guide if you don’t know how.

Fact: When we replaced the BOOT directory, we replaced the default boot loader for the drive.

Step 4 – Create custom boot entries

Make sure you have the latest version of Clover Configurator. (Fetching partition UUID’s was recently added!)

File > Open > navigate to your config.plist

Under the Gui section, create a new Custom Entry with the following:

  • Volume – Select the EFI partition that we’ve been working on (from Step 1). The UUID automagically appears — hooray time saved!
  • Path – Use your new custom path, e.g. `EFI/MS-Microsoft/Boot/bootmgfw.efi`
  • Type – Set to Windows
  • Everything else is probably optional

Similarly, repeat for your Mac partition.

Unlike my screenshot, keep Scan Auto=Yes for the next step (or the UEFI Shell boot item won’t show up). You can turn it off after everything works.

Step 5 – Purge all boot entries

Reboot. Clover should boot!

Select UEFI Shell:

Run this command: dmpstore -d Bo*

Run this command: dmpstore -d Boot0*

and then dmpstore -d BootOrder

This will clear the BootOrder and any other Boot entries from the EFI NVRAM. That’s what you want, right?

Alternative method: see this forum post

Conclusion

By circumventing the hard-coded search paths in the UEFI firmware, we prevented the firmware from erroneously adding a “Windows Boot Manager” boot entry on every boot, thus preventing the scenario of the firmware freezing/hanging on boot due to too many entries. Neato!


AsRock users: If, after rebooting, no Clover doesn’t start, you need to boot into a copy of Clover on a USB to run:

bcfg boot add 0 fsX:\EFI\BOOT\BOOTX64.EFI "My Clover UEFI boot entry"

from the UEFI shell, where fsX is your EFI partition. Figure out which fs0, fs1, etc. it is using the ls command.