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!
Rename the Windows EFI bootloaders to something else, so that the BIOS doesn’t see them.
The set up:
I have a SSD for each Windows and Mac. I’ve placed the EFI bootloaders for both Windows and Mac on a single EFI system partition (EFS). In my case, this is the EFS of the Windows SSD drive.
Disk #1: ``EFI (Clover bootloader as default, Windows bootloader) + Windows NTFS`` Disk #2: ``EFI (leave empty, don't use) + macOS HFS``
Keeping all bootloaders on a single EFS seems to help prevent the issue.
There are some drawbacks with this method. Whenever you wish to run..
- the “bcdedit“ Windows utility / make changes to the Windows bootloader, or
- run Windows Memory Diagnostics
…you’ll first need to restore the Microsoft folders back temporarily. Afterwards, you would want to rename it back.
Be prepared to get your hands dirty with UEFI bootloaders!
Step 1 – Boot into OS X, mount the EFI partition
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 – Rename Windows boot directories
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, which is causing the redundant entries – Grrr!
Microsoft part to something else – I just prefixed it with
Pro-tip: We want to keep the Windows EFI files as-is, as it contains BCD boot stuff, which can be _annoying_ 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
CLOVER folders over to your EFI partition.
You should now end up the following:
At this point, re-configure your Clover
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*
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
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!