Contribute
Register

[Solved] Messy bootloader after Windows 10 installation

Status
Not open for further replies.
Joined
Feb 3, 2011
Messages
20
Motherboard
GA-Z170N-WiFi
CPU
i7-6700
Graphics
GTX 1080
Mobile Phone
  1. Android
  2. iOS
Hello!

Yesterday I installed another SSD in my hackintosh on which I installed Windows 10 with a USB key.

I also updated to MultiBeast 10.3.

Then while I was at it, I updated my Z170N-WIFI BIOS from F7 to F20i. I thought that in 2018, settings would be kept, but I soon discovered that it hadn't.

If it ain't broke, don't fix it, I know ;)

I don't know exactly if this is because of bugs (I've seen at least a few in this BIOS) or if I've been unable to restore the right settings, but I can't boot macOS 10.13.4 from my SSD. After messing with BIOS settings, I'm able to boot macOS from my existing Unibeast USB key, which has the macOS 10.13.0 installer.

Anyway I discovered that the Windows 10 installer had installed the Windows boot manager on the macOS SSD, which is the first SATA drive, instead of the Windows SSD. How dumb… I won't forget to unplug every other drive next time!

Yet, even though I can successfully reinstall Clover with MultiBeast, it doesn't replace the Windows boot manager.

Can you help me repair my bootloader on my macOS SSD without losing any data? :) What should I do?
 
Moved to Multi Booting.
The 'sticky' guides in this forum may help you.
 
I've read Bald's guides, which are inspiring for my next installation, thanks for the advice!

Unfortunately, I haven't been able to figure out how to fix my mess reading them.

I think I need to start from scratch the EFI part of my macOS installation, any idea how I can do it?
 
I think I need to start from scratch the EFI part of my macOS installation, any idea how I can do it?
Disconnect your Windows drive.
Boot from your USB UniBeast installer.
Mount the EFI partition of your SSD.
Remove any existing files from your EFI partition - You may need to show hidden files and folders.
Install Clover to your SSD - Or copy the /EFI folder from the EFI partition of your USB installer to the EFI partition of your SSD.
 
I think I need to start from scratch the EFI part of my macOS installation
Starting from scratch is not necessary. There is an EFI boot menu stored in NVRAM. You can manage it with efibootmgr from Linux or EasyUEFI from Windows.

Windows installer uses an existing EFI partition rather than creating a new one. EFI does not specify the number or location of EFI system partitions on internal disks. Microsoft prefer one per multiple Windows/other OS installations.
 
Disconnect your Windows drive.
Boot from your USB UniBeast installer.
Mount the EFI partition of your SSD.
Remove any existing files from your EFI partition - You may need to show hidden files and folders.
Install Clover to your SSD - Or copy the /EFI folder from the EFI partition of your USB installer to the EFI partition of your SSD.
It worked, thanks! I've copied the EFI folder from the Unibeast USB installer, and then used MultiBeast to optimise it.
Starting from scratch is not necessary. There is an EFI boot menu stored in NVRAM. You can manage it with efibootmgr from Linux or EasyUEFI from Windows.

Windows installer uses an existing EFI partition rather than creating a new one. EFI does not specify the number or location of EFI system partitions on internal disks. Microsoft prefer one per multiple Windows/other OS installations.
Now I'd like to install the Windows Boot Manager on the Windows SSD, any advice? I've backed up the previous /EFI folder on my macOS SSD, which includes a Microsoft folder.
 
Now I'd like to install the Windows Boot Manager on the Windows SSD, any advice? I've backed up the previous /EFI folder on my macOS SSD, which includes a Microsoft folder
See the bcdboot Windows command, you can use it from the installation media.

https://docs.microsoft.com/en-us/wi...sktop/bcdboot-command-line-options-techref-di

You may still want to configure the EFI boot menu yourself. Booting e.g. Clover on internal disks without doing this isn't part of UEFI so doesn't always work (as opposed to does always work no matter what Windows does).
 
Last edited:
See the bcdboot Windows command, you can use it from the installation media.

https://docs.microsoft.com/en-us/wi...sktop/bcdboot-command-line-options-techref-di
Thank you for the link. I tried to make my Windows SSD bootable, with this command:
Code:
bcdboot C:\Windows /s C: /f UEFI /v
It gave me a successful message in my native language ("Les fichiers de démarrage ont bien été créés."), but I still wasn't able to boot. There was no "UEFI" prefix in front of my SSD in the boot drives list of the BIOS, so I had the following error message: "Reboot and select proper boot device or insert boot media in selected boot device and press a key".

So I checked the partition with DiskPart from the Windows installation media to discover that there was no EFI system partition or recovery partition on the SSD ("diskpart list vol"). I could have tried to repartition and create them myself with diskpart, but instead I "clean"ed the SSD, made sure it was in GPT ("convert gpt") and decided to reinstall Windows 10 from scratch, as I just had a fresh install.

Useful resource: https://docs.microsoft.com/en-us/wi...configure-uefigpt-based-hard-drive-partitions

Now it works fine. I can choose to boot even if the Windows SSD is the only one enabled, or I can boot to Windows from Clover from my macOS SSD.

So thank you for your help!

You may still want to configure the EFI boot menu yourself. Booting e.g. Clover on internal disks without doing this isn't part of UEFI so doesn't always work (as opposed to does always work no matter what Windows does).
I don't understand that part, can you explain it to me?

Also, it's unrelated but can you provide a link explaining why MultiBeast installs kexts to /Library/Extensions instead of /EFI/CLOVER/kexts? :)
 
It gave me a successful message in my native language ("Les fichiers de démarrage ont bien été créés."), but I still wasn't able to boot. There was no "UEFI" prefix in front of my SSD in the boot drives list of the BIOS, so I had the following error message: "Reboot and select proper boot device or insert boot media in selected boot device and press a key".
If your firmware has the AMI NTFS driver this should work (using the C: drive) otherwise firmware won't be able to read the path to \EFI\MICROSOFT and its a no-go.
So I checked the partition with DiskPart from the Windows installation media to discover that there was no EFI system partition or recovery partition on the SSD ("diskpart list vol"). I could have tried to repartition and create them myself with diskpart, but instead I "clean"ed the SSD, made sure it was in GPT ("convert gpt") and decided to reinstall Windows 10 from scratch, as I just had a fresh install.
Expected. The Windows installer will use an existing EFI partition if it finds one, consistent with how Microsoft recommend multi-booting different versions of windows from a single instance of the Windows boot loader. It doesn't consider other OS's when making the choice.
I don't understand that part, can you explain it to me?
EFI has a boot menu, each entry for these kind of things identifies a partition on an internal disk and a loader, something like:

Partition UUID -> \EFI\VENDOR\LOADER.EFI

By adding an entry to the menu for Clover e.g. \EFI\CLOVER\CLOVERX64.EFI firmware can boot it properly irrespective of changes made by the Windows installer. \EFI\BOOT\BOOTX64.EFI is for booting from external disks (its the only path used) or is used on internal disks when there is no bootable entry in the EFI boot menu (it is the fallback path). When Windows is installed it creates an entry in the EFI boot menu so the deterministic boot is no longer supposed to be falling back to the BOOT folder. Different firmware vendors may have different implementations or customisations (e.g. WHQL certification, other quirks) but following the spec the vendors have all signed up to is much more likely to work universally.
Also, it's unrelated but can you provide a link explaining why MultiBeast installs kexts to /Library/Extensions instead of /EFI/CLOVER/kexts? :)
Not all kexts work properly when injected by Clover. Extensions in /Library/Extensions are considered/included when the pre-linked kernel is built. Unless you have a specific reason to relocate extensions then InjectKexts->Detect, SIP disabled, kexts installed to /Library/Extensions + a copy of FakeSMC installed in /EFI/CLOVER/KEXTS/OTHER are sensible defaults.
 
Thank you for your explanation.

At least I gained a better understanding of UEFI through this adventure!

Regarding kexts, when I was reading other sources (IM…), installing Clover and extensions manually, I had all my kexts in the ESP and it was working fine (not much more than FakeSMC and networking). The advantage is that I never had to deal with the kernel cache. Also I found it was neat :)

Nevertheless, my hackintosh works fine with the way MultiBeast handles it, so it's fine ;)
 
Last edited:
Status
Not open for further replies.
Back
Top