Contribute
Register

[Guide] How to keep Clover working when installing Windows and Linux

Joined
Aug 1, 2015
Messages
261
Motherboard
Z97X-UD3H-BK
CPU
i7-4790k
Graphics
R9 270X
Mobile Phone
  1. Android
A very common issue when multibooting macOS/OS X with Windows and Linux is that after installing the latter the computer will only boot to them. The reason for this is that Clover does not automatically add itself to the UEFI firmware boot menu that is accessible by pressing F12 or another hotkey. When no other operating systems or boot managers are present the computer will automatically start Clover from the UEFI fall back path at EFI\Boot\BootX64.efi which may be present on the menu as an entry called UEFI OS or UEFI [Hard Disk Name]. After the installation of Windows or Linux a new entry for the respective OS will be added to the top of the list (default selection) and the Clover Boot Menu will no longer appear at startup. The most frequently used solution is renaming the Windows Boot Manger executable bootmgfw.efi to bootmgfw-orig.efi but this is only a temporary solution that will break whenever Windows updates occur. The proper thing to do is add a new entry for \EFI\CLOVER\CLOVERX64.EFI to the top of the menu.

Four methods to accomplish this are described below.

Windows: EasyUEFI
  1. Download and install the EasyUEFI utility.
  2. Start it and click the Manage EFI Boot Option button.
  3. Click the plus button in the center column of the main window to create a new entry.
  4. In Type select "Linux or other OS" then in Description enter "Clover Boot Manager".
  5. Click on the appropriate EFI partition in the disk list then click the Browse button and select the \EFI\CLOVER\CLOVERX64.efi file.
  6. Click OK twice and confirm the new entry is correct on the main window.
  7. Click the Power menu and select Reboot to verify the Clover Boot Menu appears.
Linux: efibootmgr
  1. Boot to your Linux distribution on your hard disk or install flash drive. (UEFI mode)
  2. Open Terminal and enter the command below. (Assumes correct EFI partition is sda1 otherwise check and use the -d and -p switches to select the correct disk/partition.)
    • Code:
      sudo efibootmgr -c -l \\EFI\\CLOVER\\CLOVERX64.efi -L "Clover Boot Manager"
  3. Close Terminal then restart and remove the flash drive if present and verify the Clover Boot Menu appears.
Linux/GRUB updates might sometimes require using the -o switch to move Clover back to the default position in the boot order. An example is provided below where Boot0000 is Clover.
  • Code:
    sudo efibootmgr -o 0,7,81,82,83,84
macOS/OS X: bootoption

This is a utility developed by vulgo similar to the Linux efibootmgr. Visit his GitHub page for instructions and more info. A full install of Xcode is required to compile/install it and you must have functional NVRAM. Emulated will not work.
  1. Install with Homebrew or compile and install directly from the source code.
  2. Open Terminal and use diskutil to identify your EFI partition then mount it and add a new entry for Clover as the default.
    • Code:
      diskutil list
    • Code:
      sudo diskutil mount disk0s1 (Assume EFI partition is disk0s1)
    • Code:
      sudo bootoption create -l /Volumes/EFI/EFI/CLOVER/CLOVERX64.efi -d "Clover Boot Manager"
    • Code:
      diskutil unmount disk0s1
  3. Close everything then remove any Clover USB and restart to verify the Clover Boot Menu appears.
Clover UEFI Shell:
  1. Boot in UEFI mode to your Clover install USB and select the UEFI Shell option.
  2. Type "map" at the prompt to display the filesystem mapping table. It is also displayed automatically when the shell loads and may still be on the screen. Use the PageUp and PageDown keys to scroll the screen output if needed.
  3. Identify the hard disk(s) which will be designated by SATA in the device string. The EFI partition will be the first one on the disk. See the examples and commands below for help identifying disks and partitions.
    • FS0 is the USB drive and FS1 is the hard disk EFI partition.
      • FS0: Alias(s):HD0b0c0b:;BLK1:
        PciRoot(0x0)/Pci(0x1A,0x0)/USB(0x1,0x0)/USB(0x2,0x0)/HD(1,MBR,0x494A8988,0x800,0x1D3C800)
        FS1: Alias(s):HD1a65535a1:;BLK3:
        PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x0,0xFFFF,0x0)/HD(1,GPT,6911C183-3B22-4308-B1BE-128AB064B16E,0x28,0x64000)
    • Two hard disks with EFI partitions. FS0 is the first one and FS3 is the second.
      • FS0: Alias(s):HD0a65535a1:;BLK1:
        PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x0,0xFFFF,0x0)/HD(1,GPT,448717E9-5082-4BEF-A3BA-23030115A603,0x28,0x64000)
        FS3: Alias(s):HD0b65535a1:;BLK5:
        PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x1,0xFFFF,0x0)/HD(1,GPT,5F7AFF34-9856-4C9F-9EEB-498E3D6CAF24,0x28,0x64000)
    • Type fsX: to change to a filesystem mapping where X is the number.
    • Type "vol" to see disk labels and "ls" to examine the folder structure.
  4. When the proper filesystem mapping is found create a new firmware boot entry.
    • Code:
      fs1: (or whatever mapping is correct)
    • Code:
      bcfg boot add 0 efi\clover\cloverx64.efi "Clover Boot Manager"
    • Code:
      reset
  5. Remove the install USB when the system restarts and verify the Clover Boot Menu appears.
Once this is done Clover will boot reliably and there should be few issues with the boot order changing as a result of operating system updates. Any of the above tools can be used to correct other related problems such as old, redundant, duplicate or conflicting UEFI boot options as described in this related post.
 
Last edited:
I don't have a Windows or Linux partition, so the first two methods are out.

I installed bootoption but I realized my motherboard does not support native NVRAM, so this method doesn't work.

I can't get the "colon" key to work in Clover UEFI shell because the shift key doesn't work. I tried a Windows and a Mac keyboard but found no way to input a colon.

Any suggestions other than creating a Linux boot disk to try efibootmgr?


Edit: I fixed it! I updated the Clover on my bootable USB thumbdrive to r4895, and the SHIFT key works! I was able to input a "colon" to create the missing UEFI boot entry.
 
Last edited:
You're the man, thanks for the tip. They weren't kidding when they named it EasyUEFI. Took all of two minutes to do with the free trial.
 
I have done this on two machines and both had Windows and Linux on. On first boot afterwards I get Clover but if I boot into Windows on the next (2nd boot) it does NOT show Clover. Its like Windows is re-asserting itself on every boot.

Any ideas?
 
I have done this on two machines and both had Windows and Linux on. On first boot afterwards I get Clover but if I boot into Windows on the next (2nd boot) it does NOT show Clover. Its like Windows is re-asserting itself on every boot.

Any ideas?

Provide some details on (or update your profile with) the systems such as make/model chipset. Which method(s) were used?
 
Last edited:
Provide some details on (or update your profile with) the systems such as make/model chipset. Which method(s) were used?

Both machines HP SFF 6300 (Q75) and HP SFF 8300 (Q77). I used EasyUEFI, added Clover entry and moved it to top of the list and saved. It works once. Then on 2nd boot you only have Windows. Its like Windows asserts itself by removing Clover....
 
Both machines HP SFF 6300 (Q75) and HP SFF 8300 (Q77). I used EasyUEFI, added Clover entry and moved it to top of the list and saved. It works once. Then on 2nd boot you only have Windows. Its like Windows asserts itself by removing Clover....

If you don't boot Windows does the Clover entry survive more than two restarts and a shutdown? Does it disappear from the list only when starting Windows? If so then we can probably rule out NVRAM issues. You might want to post before and after screenshots of EasyUEFI when trying this.
 
If you don't boot Windows does the Clover entry survive more than two restarts and a shutdown? Does it disappear from the list only when starting Windows? If so then we can probably rule out NVRAM issues. You might want to post before and after screenshots of EasyUEFI when trying this.

Yes and yes

Before below (after is identical except Clover has been removed)



There are two Windows EFI boot options when I boot up.
1st says Boot Microsoft EFI from EFI
2nd says Boot Microsoft EFI Boot from EFI
If I boot with EITHER they both remove Clover and put Windows in as first boot option. If I put Clover as 1st and Windows as 2nd but disabled then it re-enables Windows and puts Clover as a 2nd option (which means no sign of Clover on reboot).

Basically it is as I first said. Windows is re-asserting itself on EVERY boot.

Also is there some way to remove ONE of them? I'd like to be showing Windows/Linux/MacOS when Clover loads (if I ever get that far!)

Do I need to rename "bootmgfw.efi" in the EFI partition to stop it re-asserting?
 
Last edited:
https://answers.microsoft.com/en-us...t/9f02fbe4-acae-41cf-b098-6ecbe6e5e868?auth=1 it seems I am not alone in seeing Windows overwrite other OS

and




SOLUTION FOUND:
1) Don't fight Windows (let it think it has won)
2) Replaced bootx64.efi and bootmgfw.efi by copying CLOVERX64.efi and renaming. Keep the original files by renaming them FIRST with .bak or something.
3) Windows removes the Clover entry that EasyUEFI creates and thinks it has won the battle but we have beaten it!

Bonus: No two entries for Windows now too :cool:
 
Last edited:
Also is there some way to remove ONE of them? I'd like to be showing Windows/Linux/MacOS when Clover loads (if I ever get that far!)

Yes, you just have to add them in clower in the Hide part ! I have same 8300 HP as you and it worked well :)

EDIT : nervermind, you already figured it by yourself !

I followed your solution, it works so far but I don't know for how long, as if i understand correctly, any windows update will put it down ?
 
Back
Top