Contribute
Register

<< Solved >> UEFI Hell... some specific questions

Status
Not open for further replies.
Joined
Aug 30, 2016
Messages
186
Motherboard
Asus MAXIMUS XI HERO
CPU
i7-8700K
Graphics
RX5700 XT
Mac
  1. iMac
Classic Mac
  1. iMac
Mobile Phone
  1. Android
I've been in UEFI hell for a while now, and am not getting any closer to understanding what's going on.

[UPDATE:] OMG, why have I not yet read this thread
(reading now)

Here is the diskutil summary of my Mojave boot disk:

/dev/disk0 (internal):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme 500.1 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk2 499.9 GB disk0s2


This is about what I would expect. APFS boot drive, EFI partition.

However, my BIOS shows two identical non-Microsoft UEFI boot entries for this drive. Why? It only has one EFI partition. Not that it really matters, because the only boot option that works in the BIOS priority list is "Microsoft Boot" from that same EFI partition.


Here's the diskutil summary of my Win10 boot drive (which used to work until yesterday!)

/dev/disk1 (internal):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme 512.1 GB disk1
1: Microsoft Reserved 16.8 MB disk1s1
2: Microsoft Basic Data 511.7 GB disk1s2


Note that diskutil doesn't recognise a partition here, just "MS basic data". However, Disk Utility (GUI version) is able to mount that partition (as Untitled, an NTFS volume). I have just installed Tuxera NTFS, so NTFS volumes are r/w-able and formattable from Mojave.

What I notice is that there's no (longer any) EFI partition on that Win10 disk. I believe that there was one right after Win10 install, though I don't have a screenshot to prove it. Online I have found some sad stories about Win7-10 occasionally (usually during an upgrade) deleting its own EFI partition (!!) and there are some dangerous-looking recipes for repairing that situation. Once my backup is complete I might try this. Has anyone else ever seen Win EFI partition disappear?


So... in a dual boot Hackintosh with each OS on its own drive... is there supposed to be one EFI partition, or two? If there is only one, does Win10 repeatedly clobber it? Because I thought I had everything configured properly -- I could select Mojave and boot it, then I could shut down and select Windows and boot it. And yet after running Win10 for a day, next time I tried to boot Mojave UEFI hell broke loose (full and anguished description in other thread which is probably TLDR: https://www.tonymacx86.com/threads/...iour-booting-into-bios-instead-of-efi.290291/).

There seems to be a catch-22 here. If Win10 will not tolerate 2 EFI partitions and insists on colonising the pre-existing Clover EFI partition, then it overwrites bootmgfw.efi with a fresh copy. But if I mv that bootfile out of the way and replace it with a copy of Cloverx68 boot, I'm no longer able to boot Win10 because an attempt to boot Win10 will just reboot to the Clover menu.

This is turning into such a nightmare that I may just have to live with USB sticks to select which EFI folder and hence which OS to boot. I can always make backup USB sticks :) but I wish I understood what was happening, and I wish UEFI boot (and BIOS) was less "intelligent" and could be hard-configured in some visible human-readable place, like "boot this file in this directory from this partition". Can it?
 
Here's the diskutil summary of my Win10 boot drive (which used to work until yesterday!)

/dev/disk1 (internal):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme 512.1 GB disk1
1: Microsoft Reserved 16.8 MB disk1s1
2: Microsoft Basic Data 511.7 GB disk1s2
And here is your main problem - you have installed Windows Legacy mode. For proper operation with a UEFI system it should be installed UEFI mode.
a UEFI disk will show:

0: GUID_partition_scheme
1. WinRe tools
2 Microsoft Reserved
3 EFI
4 System

Run msinfo32 to launch the Microsoft information tool and check the BIOS Mode - if it does not say UEFI then there is your problem.
 
@GB, well, I hesitate to disagree with a real expert which you clearly are, but I don't think I installed Win10 in legacy mode. I used Rufus with the UEFI option set to make my Win10 installer USB stick; my rufus USB stick has a UEFI partition with an EFI folder on it; an EFI partition was created on the Win10 disk during the install process, and Clover could see the Win10 boot manager and boot it. That suggests to me that it must have been at that point a successful UEFI install, no? Or could Clover detect and boot a legacy Win10 install?

Anyway about three days ago I had finally succeeded (or so it seemed!). I could see Win10 boot manager EFI and Mojave boot disk both in Clover menu, and when I selected Win10 I got a Windows boot. I left Windows up for about a day -- doing installs and customising and so on -- and then shut it down confidently expecting to get back to Clover and boot Mojave.

That was when the nightmare began. When I shut'er down and rebooted, I could only boot into BIOS over and over again. It's like BIOS had lost all knowledge of any bootable devices (even though there were some EFI options in the boot menu). No matter which option I selected in boot menu, I always booted back to BIOS. But if I plugged in the Mojave thumb drive I could get back to Mojave. And ever since, I've been trying to restore the ability to boot into Clover without the thumb drive. I finally succeeded in this, yesterday, thanks to this wonderful Guide


But now I can't boot into Win10 any more. And when I look at my Win10 disk, there's no EFI partition. Yet I booted Win10 with Clover just three days ago, and I swear by whatever you like that I did not reformat or mess with the Win10 disk. There are some mentions online about Win7-10 occasionally eating its own EFI partition (WTH?) so I could try the recommended fix for that (there's a method using diskpart via cmd shell from the installer).

This is where my question becomes really important: when dual booting Win10 and MacOS from different SSDs, is there only one master EFI partition, or is there one on each boot disk? If Win10 ate its own EFI partition on its boot disk, would that explain why I can't get it to boot any more?

I'll try to get some screen shots of what Clover is doing now, because it's pretty weird and might offer a clue.
 
Last edited:
Progress!

I can now boot Mojave from Clover reliably, if I make the MacOS EFI partition #1 on the BIOS list and select the boot disk icon in the Clover menu.

I can now boot Windows -- but not from Clover -- by selecting the Windows Boot Manager as #1 on the BIOS list and continuing. My Windows install seems to have survived all this desperate hacking around, which is nice.

So what's missing now is the ability to boot Win10 from Clover. Clover still isn't seeing the Win10 bootmgr, only some Win10 "EFI" devices that don't really work (see below)

To get to this imperfect but livable setup, I manually replaced the EFI partition on the Win10 disk. Here's the recipe, in case anyone else ever finds themselves in this fix. I found most of it on one Windows discussion forum, and the last (important) bit on another one.

- Boot the computer using the Win10 installation media.
- On the first screen, press SHIFT+F10 to bring up the command prompt.
- Run the following commands at the command prompt.

diskpart
list disk
select disk N
Note: Carefully select by its number N the disk where you want to add an EFI System partition.
list partition
select partition N
Note: Select the Windows OS partition or a data partition (by number N)
shrink desired=100
create partition efi size=100
format quick fs=fat32
assign letter=s
list partition
list volume
Note: Note the volume letter where the Windows OS is installed. Probably C.
exit

bcdboot C:\windows
/s S: /f uefi

Note: if your Windows volume was not C, then substitute the correct vol letter name for your Windows volume.

This restores my ability to boot Win10, just not from Clover as mentioned above.

The next trick, perhaps, is to copy all the files from Win10 boot disk EFI partition over to the Microsoft folder on the Clover EFI partition.

I did try that, but either I didn't do the copy correctly or Win10 won't boot from an EFI partition on another drive, because I got the dreaded "winload.efi missing" error.

Another trick might be to move Clover and all its bits and pieces over to the Win10 boot drive :) and try it from there.

Slowly, by painful empiricism, all this UEFI stuff is starting to make a little more sense to me.
 
@GB, I eat crow :) You Were Right. had a WinDoze trainwreck today (was there ever such a fragile OS?) in which it started claiming the system needed repair, then said it was unable to repair it, etc. Had to reinstall from scratch. So I watched the install very carefully, now understanding a bit more about what it all means. Even though my Rufus USB boot stick is set up for EFI, when the installer makes a New Windows installation on a blank target drive, it looks like it creates only the MSR and primary partitions. I had to use diskpart and bcdboot manually to create an EFI partition.

Before the train wreck (and possibly not unrelated to it!) I did try copying the CLOVER folder from my MacOS boot drive EFI folder to the Win10 boot drive EFI folder. I'm not sure whether that worked or not...

For anyone trying to use Win10 disks, even with Tuxera installed there are issues with the Windows NTFS partition. Even when a clean shutdown has been done, it still claims the system was "hibernating" and the disk needs to be "purged" before mounting. This purge, I think, might be why my Win10 crashed hard during its next uptime, and was never recoverable. Or it might have been because of my trying to boot it from Clover.

I believe I'm once again back to a fragile but livable configuration in which I have to pause in BIOS and select which boot loader I want, Win10 or Clover. My attempts to get Clover to boot Win10 have been, so far, an epic series of fails; and I'm tired of fighting with it so am gonna leave it as is for the moment.
 
Did you read the pinned guides at the beginning of this forum before installing?
 
@GB yes, but I have to admit that this is my first-ever WinDoze install and only my 2nd Hackintosh, so a lot of what I read was incomprehensible. Now that I've had some (painful) experience I will read the guides again, and I expect that they will make a lot more sense this time around, because I'll understand what the acronyms mean and what the stages of the install process are etc.

I've got serious problems with the Win10 installation now -- it crashes and corrupts its own boot disk -- so having to start all over again. Kind of maddening because the win10 boot disk is still mountable, contents intact as far as Mojave can tell, and yet it won't boot any more -- blue screen "your system needs repair" messages. I'll take a sanity break doing some other tasks, then read the guides start to finish, and keep trying. Maybe booting Win10 in legacy mode is the way to go.
 
@GB yes, but I have to admit that this is my first-ever WinDoze install and only my 2nd Hackintosh, so a lot of what I read was incomprehensible. Now that I've had some (painful) experience I will read the guides again, and I expect that they will make a lot more sense this time around, because I'll understand what the acronyms mean and what the stages of the install process are etc.

I've got serious problems with the Win10 installation now -- it crashes and corrupts its own boot disk -- so having to start all over again. Kind of maddening because the win10 boot disk is still mountable, contents intact as far as Mojave can tell, and yet it won't boot any more -- blue screen "your system needs repair" messages. I'll take a sanity break doing some other tasks, then read the guides start to finish, and keep trying. Maybe booting Win10 in legacy mode is the way to go.
Suggest you use diskpart to run "clean all" on that Win10 SSD so there is no vestige of the fouled installation left and start from scratch with it.
 
@GB yes I am reconciled to installing Win10 yet again to a bare disk. It doesn't take that long on SSD, fortunately. I've just been reading


and if this still works for Mojave then it could maybe solve my problem... I can dream, can't I?

I sure wish that the boot process left a human readable log somewhere, like in nvram in the BIOS, that revealed exactly what was happening: which drive was being detected, which EFI folder opened, which boot efi invoked. It seems so blackboxy.

And here is the doc I've been longing for but finally found.

 
Last edited:
And here is the doc I've been longing for but finally found.

UEFI boot: how does that actually work, then?
Thanks for posting. Here's what I think are the most valuable "take home" points from the article for us hackintoshers.
  • If you can possibly manage it, have one OS per computer. If you need more than one OS, buy more computers, or use virtualization. If you can do this everything is very simple and it doesn’t much matter if you have BIOS or UEFI firmware, or use UEFI-native or BIOS-compatible boot on a UEFI system. Everything will be nice and easy and work.
  • If you absolutely must have more than one OS per computer, at least have one OS per disk.
  • If you absolutely insist on having more than one OS per disk, understand everything written on this page, understand that you are making your life much more painful than it needs to be, lay in good stocks of painkillers and gin, and don’t go yelling at your OS vendor, whatever breaks. And for the love of cookies, don’t mix UEFI-native and BIOS-compatible OS installations, you have enough pain to deal with already.
 
Status
Not open for further replies.
Back
Top