dortania / OpenCore-Legacy-Patcher

Experience macOS just like before
https://dortania.github.io/OpenCore-Legacy-Patcher/
Other
11.79k stars 1.13k forks source link

Windows EFI Partition/boot option disappears in OCLP as soon as you use the "Select Bootdisk" option in either MacOS or Windows. #270

Open Electr1fying opened 3 years ago

Electr1fying commented 3 years ago

When i install W10 (H2101) via OCLP on my Macbook Pro 9,2 everything goes well and Windows seems to run perfectly fine.

That is until i use the "Select Bootdisk" option in Settings in either MacOS or Windows (both when booted).

I would like MacOS to boot by Default, but the OC Boot Picker selects Windows as standard after it has been installed. The CTRL+Click option to make MacOS the default Boot option, does not work with me in the OC Boot Picker. So then i try the Bootdisk option in MacOS or in the Windows Bootcamp settings, but as soon as you use that, Windows disappears from the OC Boot Picker.

I did a little investigation into it, and it seem that somehow, Windows's EFI Partition gets deleted by using the "Select Bootdisk" option. I tried to recreate a new EFI partition for Windows, but OC didn't recognise it anymore. I ended up reinstalling Windows and have done it last weekend for the 4th time 1 week i believe.

I use the latest version of OCLP currently available (0.16). I'm curious if you are able to reproduce the issue as well, and may be able to develop a solution.

Thanks in advance.

mikebeaton commented 3 years ago

In macOS, do this https://themacadmin.com/2012/02/15/mounting-the-efi-boot-partition-on-mac-os-x/

Then, if you can find EFI/Microsoft/Boot/bootmgfw.efi within that partition (i.e. basically if /Volumes/efi/EFI/Microsoft folder still exists), then your Windows boot files are still there, and you don't need to re-install it, you just need to make it show up in OC again.

Have you tried something as simple as clearing NVRAM (CMD+OPT+P+R while booting, press and hold these until you have heard the boot chime twice)? After doing that, you may need to hold down ALT to enter the Mac boot picker initially, and then use CTRL+Enter in the Mac boot picker to make OC be the default boot option again (unless it's already the default, in which case you're fine). Once your Mac is booting into OC - and especially after clearing NVRAM - then CTRL+Enter should work within OC to set the default boot option there (and I believe Windows should show up again, as well).

Electr1fying commented 3 years ago

Thanks for your comment!

The EFI partition seems to really have actually disappeared. I run Windows of a separate SSD (the 250GB one). Further i have 2 Mac partitions on a single 1TB SSD. One called MacOS which contains the OS and the other one is called Mac, which i use for data storage.

Below a screenshot from the "diskutil list" output:

Schermafbeelding 2021-06-12 om 11 43 10

As you can see, no Windows EFI partition is present anymore after doing the Startup disk switch.

OCLP is installed on the Mac EFI partition. I tried (also) installing OCP on the Windows EFI partition after i recreated it with the Windows Recovery environment and diskpart. Unfortunately, no go in getting to boot up Windows.

Further, the MacOS Startup Disk selector still lists Windows as an option, however it fires up an error if you try to actually reboot in Windows:

Schermafbeelding 2021-06-12 om 11 52 01

Perhaps you are able to reproduce the issue? I'm curious as to what it could be/what the cause is.

Thanks again!

Ausdauersportler commented 3 years ago

The misconception is selecting the standard boot OS with these Apple or MS tools. You will get the OC boot selection on each reboot to pick the OS of choice.

Per default Windows needs no special EFI partition and as explained here in the docs.

When installing Windows it takes the single existing EFI partition.

The same does OCLP.

Unfortunately you cannot have both in the same EFI partition. It is a limitation of some BIOS implementations.

You just need another drive, usb stick, SD Card, partition where you can put OCLP.

The single disk1s1 EFI contains now the Microsoft folder with the Windows booter as well as the OC one. Delete the OC stuff following the OC or OCLP docs from there and reinstall it to another separate EFI.

mikebeaton commented 3 years ago

@Electr1fying Had you thought of raising this on https://forums.macrumors.com/threads/macos-11-big-sur-on-unsupported-macs-thread.2242172/page-99999 ? Since this seems like this is more of an open-ended discussion, and not so much a specific bug/issue which OC or OCLP should be addressing, at this point. I've got a couple more points I'd add, but seems like this Issue is less suitable as a place to discuss and thrash out what exactly the issue is! :)

mikebeaton commented 3 years ago

Any joy? It also occurred to me it might possibly be this https://macriot.com/mcrt/2014/12/08/windows-cannot-be-installed-on-to-this-disk-the-selected-disk-is-of-the-gpt-partition-style/ ? In my experience you have to do the gdisk commands from this step (only) "Reverting Your Hybrid GPT/MBR Disk Back To a GPT Disk For Windows 8/8.1 Boot Camp Installation" after any partitioning, to bring back an apparently dead Boot Camp Windows install. I haven't seen it happening just after setting boot defaults, but maybe?

Electr1fying commented 3 years ago

Thanks for your replies!

Sorry, have been pretty busy lately so i was unable to comment for a while. I eventually ended up reinstalling Windows again, seemed to be the easiest solution. Although i have now learned that Windows takes up place on the existing EFI partition as well.

I was under the assumption, and also, judging by the Windows Setup disk tool, it made its own seperate EFI partition. It seemed to make sense as i have Windows on a seperate SSD, so i figured it would have its own seperate bubble, apart from MacOS.

I now noticed OCLP warning me about the presence of Windows EFI boot files on the 1 EFI partition (which is on my "Mac" SSD). So i think i wil try to create a seperate entry for OpenCore, like you mentioned.

Thanks again!

mikebeaton commented 3 years ago

Yes! I spent ages reinstalling Windows to bring it back, when first playing around with 3 OS multi-boot on Mac (w/ or w/out OC). Tbh, I strongly recommend trying the set of gdisk commands next time you get it - would be interested to know the results!

Tiger-AC commented 2 years ago

I recently installed Win10 on a dedicated SSD. It's my first time and the whole thing was a blur to me. But I ended up for having both OCLP and Windows boot up in the same EFI partition. OCLP + Windows boot EFI The behavior is that the iMac will always present the OCLP EFI icon first and the Windows EFI will show up only after the OCLP EFI boot up. Not sure if it is relevant to this issue though. Also I can't get into Boot Camp in Control Panel to change startup disk due to a "privilege" issue.