Jump to content

Multi Boot Situation Where Windows Boots All Time ---Boot Loop of Windows And Some Fixes


2 posts in this topic

Recommended Posts

Greetings,

 

Situation: Windows and MacOS on same drive or even separate drives/disks.

Encountered Issue: Not able to boot Windows from inside OpenCore or Clover. Either way this is for any type of bootloader present if you have this problem

ONLY>.

 

So what happened to this Laptop after installing of Windows?  Could not boot from within OpenCore even though the nice Windows Icon was present.

Even though I had taken the steps manually to set the bcdboot, the bcdedit, lacked more information to properly have the result.

 

Windows likes to be by default the only OS on the drive and thus wants the 1st position after the EFI.

disk0s2 Windows

disk0s1 being EFI.

 

Problem: due to MacOS being the first position for OS.  disk0s2

with our bootloader Clover or OpenCore or rEFInd in disk0s1 occupying the "EFI" made partition by default GUID/GPT.

MBR does not by default parameters.

 

So what happens if there are two other OS's on there ahead of Windows?

We need to have a middleman that knows what to do in this case and automatically.

 

So now we have two EFI's on the drive. One for Mac and one for Windows.

Positions as follows:

 

disk0 (the disk with all your OS's if single drive no external.)

Efi on disk0s1  (Clover, OpenCore some other)

Container disk0s2 ( the whole pie of MacOS'(s) APFS formatted disk, minus Windows Efi and data)

Efi for Windows on disk0s3

Windows on disk0s4

 

disk1 --> is where all the MacOS's are in the 'container' of disk0s2, APFS format and is really not disk1 but a virtual type disk, emulation kind of.

This was done on other OS's previously I don't recall which one off hand but quite some years ago a few decades.

So Apple does it too. But calls it APFS. 

 

The first EFI must be able to distinguish and automatically place the boot parameters to boot Windows from within.

This was not happening. No auto recognition beyond placing an icon. 

 

Everything written on the NET you have tried to this point which you know of at that present! But take a break and do something else to get perspective and sanity.

 

The problem is the OS writing and the bootloader not protecting the region that has the boot order.  So the there's ....... 

Orderly fashion in the Bootloader. To be able to 'Customize' Which OS goes where in the config table.

like this:

1 EFI

2 Sun Solaris

3 MacOS Big Sur

4 Monterey

5 Catalina

6 Windows 10 Pro

 

Need a table for OS' in the boot loader Config which passes to Shell. So the User can manipulate the order.

Something that Total Commander Boot loader does. 

 

The mdidleman wasn't doing its job along with the user who was impatient and in a hurry.

 

Clover comes inside and does the trick. (The theme for OpenCore is nice hard to let go sometimes after finding it)

 

So after all this, we find a page on the NET that we probably overlooked due to the 'heading' of the 'subject' matter who would know?

But someone manages to find it and posts it for all to view afterwards under a completely different topic and subject matter which had zero

to do with our issue..Topic Subject Matter wise.  Seems always afterwards instead of before due to the lacking constance of all this information set aside in a coherent database which is readily available at anytime with word to your Siri or the other names for the other ones like Siri.  Such as Genie with a light blond hair ;) .  

 

But not to worry.  There is hope yet! --End of this non-sense. Apology!

 

To the Issue at hand:

 

Here is some information that will most certainly give you somewhere to start, and to perhaps shed and give more light to this problem

where the Bootloader and the OS clash, with user headspace to blame. Because if we really spend the time to research rather being impetuous

 and in a hurry we would have less troubles pain and shocks would be less.  

 

https://wiki.archlinux.org/title/Unified_Extensible_Firmware_Interface#Obtaining_UEFI_Shell

 

notice the title of the subject matter above in the link. UEFI. obtaining an UEFI Shell which is really pointing to an older version for an older firmware. year 2012.
Well I was searching for an replacement Shell to the one Clover has.  It is written in Russian. Need English. So your firmware BIOS, CMOS needs to be set to English

not AUTO.  And EnglishDxe.efi driver placed in Drivers>UEFI or and BIOS>EnglishDxe.efi.  

 

Windows changes boot order

  • If you dual boot with Windows and your motherboard just boots Windows immediately instead of your chosen EFI application, there are several possible causes and workarounds.
  • Ensure Fast Startup is disabled in your Windows power options
  • Ensure Secure Boot is disabled in your firmware (if you are not using a signed boot loader)
  • Ensure your UEFI boot order does not have Windows Boot Manager set first e.g. using efibootmgr and what you see in the configuration tool of the UEFI. Some motherboards override by default any settings set with efibootmgr by Windows if it detects it. This is confirmed in a Packard Bell laptop.
  • If your motherboard is booting the default boot path (\EFI\BOOT\BOOTx64.EFI), this file may have been overwritten with the Windows boot loader. Try setting the correct boot path e.g. using efibootmgr.
  • If the previous steps do not work, you can tell the Windows boot loader to run a different EFI application. From a Windows administrator command prompt bcdedit /set "{bootmgr}" path "\EFI\path\to\app.efi"
  • Alternatively, deactivate the Windows Boot Manager by running efibootmgr -A -b bootnumber as root. Replace bootnumber with the actual Windows Boot
    Manager boot number; you can see it by running efibootmgr with no options.
     
  • Alternatively, you can set a startup script in Windows that ensures that the boot order is set correctly every time you boot Windows.
    1. 1 Open a command prompt with administrator privileges. Run bcdedit /enum firmware and find your desired boot entry.
    2. 2 Copy the identifier, including the brackets, e.g. {31d0d5f4-22ad-11e5-b30b-806e6f6e6963}
    3. 3 Create a batch file with the command bcdedit /set "{fwbootmgr}" DEFAULT "{copied-boot-identifier}"
    4. 4 Open gpedit.msc and under Local Computer Policy > Computer Configuration > Windows Settings > Scripts (Startup/Shutdown), choose Startup
    5. 5 Under the Scripts tab, choose the Add button, and select your batch file
Note: Windows 10 Home does not officially include gpedit.msc, although there are unsupported workarounds to install it manually.
  • Alternatively, Task Scheduler can be used to run a startup script in Windows:
    1. 1 Follow steps 1-3 above to create the batch file.
    2. 2 Run taskschd.msc, then choose Create Task... from the Action menu.
    3. 3 On the General tab:
      Enter any suitable Name and Description.
      Ensure the user account selected is an "Administrator", not a "Standard User".
      Select "Run whether user is logged in or not".
      Select "Run with highest privileges".
    4. 4 On the Triggers tab, choose "At startup" from the menu, then click OK.
    5. 5 On the Actions tab, click New..., then Browse..., and locate the batch file from step 1.
    6. 6 On the Conditions tab, untick the Power options so the script runs when on battery power (for laptops).
    7. 7 Click OK, and enter the password of the user account selected in step 4 when prompted.

USB media gets struck with black screen --Linux

This issue can occur due to KMS issue. Try Disabling KMS while booting the USB.

UEFI boot loader does not show up in firmware menu

Some firmware do not support custom boot entries. They will instead only boot from hardcoded boot entries.

A typical workaround is to not rely on boot entries in the NVRAM and install the boot loader to one of the common fallback paths on the EFI system partition.

The following sections describe the fallback paths.

Default boot path for removable drives

The UEFI specification defines default file paths for EFI binaries for booting from removable media. The relevant ones are:

  • esp/EFI/BOOT/BOOTx64.EFI for x86_64 UEFI
  • esp/EFI/BOOT/BOOTIA.EFI for IA32 UEFI.

While the specification defines these for removable drives only, most firmware support booting these from any drive.

See the appropriate boot loader article on how to install or migrate the boot loader to the default/fallback boot path.

Microsoft Windows boot loader location

On certain UEFI motherboards like some boards with an Intel Z77 chipset, adding entries with efibootmgr or bcfg from the UEFI Shell will not work because they do not show up on the boot menu list after being added to NVRAM.

This issue is caused because the motherboards can only load Microsoft Windows. To solve this you have to place the .efi file in the location that Windows uses.

Copy the BOOTx64.EFI file from the Arch Linux installation medium (FSO:) to the Microsoft directory your ESP partition on your hard drive (FS1:). Do this by booting into EFI shell and typing:

Shell> mkdir FS1:\EFI\Microsoft
Shell> mkdir FS1:\EFI\Microsoft\Boot
Shell> cp FS0:\EFI\BOOT\BOOTx64.EFI FS1:\EFI\Microsoft\Boot\bootmgfw.efi

After reboot, any entries added to NVRAM should show up in the boot menu. END

 

Now here is the small rundown which It took sometime to find, but, lets rethink summarize a bit:

 

Conditions that may exist at present:

First Windows is not on the First partition or volume

Second Dual booting on the Same Drive condition

Third Dual booting with Multiple Drives condition.

Forth Windows could be the First Partiton or volume,

Fifth Many OS's of different flavors condition.


Rehash some commands to run in Windows:

Windows Command Prompt with Administrator rights:

 

Windows:

diskpart to see the disk, volumes on the disk and the partitions. sort of kind of dull to me, lacks the pretty diskutil list and all this.

So what to do?  Download Mini Partition Wizard this works.  Download Explorer++ this works to see the new mounts you just made 

with Mini Partition Wizard. It's free no subscriptions for both.  

 

bcdboot C:\Windows /s B:

 

Clover:

bcdedit /set {bootmgr} path \EFI\CLOVER\CLOVERX64.efi

OpenCore:

bcdedit /set {bootmgr} path \EFI\OC\OpenCore.efi

 

Useful graphical apps to help your condition:

 

Mini Partition Wizard >>more visibility and uses what's available already in Windows which Windows Disk Manager keeps to itself. What a gretch!

Explorer++

 

The data needs to reflect what is needed to boot Windows with Other OS's and other OS's without Window hijacking the bootloader.

 

Copy the BOOTx64.EFI file from the Clover or OpenCore (FSO:) to the Microsoft directory your ESP partition on your hard drive (FS1:). Do this by booting into EFI shell and typing:

 

Shell> mkdir FS1:\EFI\Microsoft
Shell> mkdir FS1:\EFI\Microsoft\Boot
Shell> cp FS0:\EFI\BOOT\BOOTx64.EFI FS1:\EFI\Microsoft\Boot\bootmgfw.efi

Hope this helps shed light and fixes the problems we meet.

 

 

 

 

 

 

 

 

 

 

 

 

Edited by makk
  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

This don't work. it's a nice pipe dream

 

Use OC MOD NDK version if dual booting on same drive.

 

I am using NDK version 80 Release MOD and it has a success story from a few.

The trick is two fold actually.

 

Clover dual boots no problems and I found I had to do nothing to the configs. But I don't like some things about it, for instance the Theme I like is not available

and the other was I forgot.

 

However OpenCore is a bit stringent and does not allow much play as compared to Clover.

 

Now Windows likes to hijack the booting process if you have these bootloaders in question.

 

What you do and there are two or three methods out there.

 

The one I used to circumvent any questions is this one:

 

Load the WIndows Install USB: boot to install but don't.

At the Windows Install Menu, use these keys:  SHIFT + F10 to bring up  

Command Prompt:

Enter DIskpart

List your disks:

list disk <> this lists your available storage drives or memory NV RAM Memory = M.2

sel the disk

sel disk x "x' is your drive number

list vol to find the volume of the EFi we are going to ex-may chow

list part

sel part the EFI partition for WIndows

delete partition override

create partition efi size=100

format quick fs=fat32 

assign letter="B"

 

next find the Windows vol

list vol

list part

sel part 

assign letter="W"

 

list vol <> to check your work. if you borked do it allover by exiting diskpart and entering it again.

 

finally when done exit diskpart

 

run this:

bcdboot W:'Windows /s B: 

 

exit 

exit 

reboot

 

Once booted into Windows through the nice bootloader Icon,

 

Open Command Prompt and run as Administrator.

 

Type the following:

 

bcdedit <?> enter

 

this should list the boot mananger and boot loader

 

Default for Windows boot manger is:  \EFI\Microsoft\Boot\bootmgfw.efi

Default Windows loader is \Windows\System32\Winload.efi

 

Don't change the second one only the first one with

 

bcdedit /set "{bootmgr}" path "\EFI\OC\OpenCore.efi" <> for OpenCore

bcdecit /set "{bootmgr}" path "\EFI\BOOT\BOOTx64.efi" <> for Clover

 

close the command prompt and reboot

 

back at the Boot Loader menu select your flavour of icecream and boot

 

 

NOTE:  The EFI when you run diskutil list will show EFI NO NAME for the Windows EFI

If you decide to mount the EFI in Windows with Mini Partition Wizii and add a drive letter then it will mount inside Windows.

However there isn't much in the EFI to do.

 

We use Explorer++.exe run as administrator manipulate inside the EFI if need be. Make copies of the EFI back it up to External Storage

Back it all up.  Cloning is best. Perhaps 'dd' command is most reliable. 

 

dd is free and you just need to make sure you know how to size everything

 

dd works because it clones everything and you can do slices

 

 

Edited by makk
Link to comment
Share on other sites

 Share

×
×
  • Create New...