1

I have two Windows 10 instances on my laptop.

When I check the Boot Entries with VisualBCD the first entry for Windows A is this:

this

The one for Windows B is this:

this

Now I added 2 entries to the refind.conf

    menuentry "Work Station" {
        icon \EFI\refind\themes\icons\os_win.png    
        volume 4:
        loader \Windows\system32\winload.efi
    }
    menuentry "Music Station" {
        icon \EFI\refind\themes\icons\os_unknown.png    
        volume 5:
        loader \Windows\system32\winload.efi
    }

When I reboot I first get into the rEFInd bootloader. When I select one of those two entries I get some message that the winload.efi could not be located...

I can only get back into one of those two Windows instances by selecting the automatically found entry, getting back into the Windows bootloader and then selecting either Windows A or B.

How can I boot directly into one of the two Windows instances without first getting into the Windows bootloader? I just cant figure it out. I already used C or D and the GUID's of the volumes in the volume part of the menuentries...

8
  • Why are you using winload.efi? The Windows bootmanager is EFI/Microsoft/bootmgfw.efi. If you are trying to use something in system32 you would need an EFI NTFS driver - do you have one? It is supplied by default with rEFInd but even so idk if you can use it to skip the bootmanager. You could try copying EFI/Microsoft/bootmgfw.efi to EFI/Boot/bootx64.efi and setting each separately in bcdedit.
    – lx07
    Dec 28, 2019 at 19:06
  • I want to boot directly to Windows A or B through rEFInd. I don't want to use the Windows bootmanager at all anymore...
    – Flo
    Dec 28, 2019 at 19:27
  • I completely understand and I do this using rEFInd. I do it by calling bootmgfw.efi in different EFI partitions on different disks. You then set each Windows instance to just boot immediately rather than give a choice of OS. You can try doing this on one EFI partition by duplicating the bootmanager from EFI/Microsoft to EFI/BOOT but IDK if it would work. I don't think you can just skip bootmgfw.efi but I'll test it.
    – lx07
    Dec 28, 2019 at 19:55
  • Ok - but how could i edit that second EFI to only boot into Windows B? Also how would i create a second EFI Partition like you have and how would i point that to only Windows B? I never really did anything like this so i sadly have no clue of how to do all of this. I really appreciate your help lx07. Also thanks for editing the post to correctly show the images (=
    – Flo
    Dec 28, 2019 at 20:23
  • You don't directly edit anything in EFI - you use bcdedit or msconfig commands in Windows. These update a file called BCD in EFI/Microsoft/Boot. Then bootmgfw.efi will look at the BCD file in it's own directory (I think only in it's own directory) and if it has only one boot option (Windows B say) it will boot it direct. Certainly if you have 2 EFI partitions it is OK - I'm not sure if you can simulate this by duplicating directories within one EFI partition.
    – lx07
    Dec 28, 2019 at 20:38

2 Answers 2

1

One way to do this is to have 2 EFI partitions.

I use rEFInd as bootmanager - this is screenshot:

rEFInd

As you can see the selected OS is the middle one and text says Boot Microsoft EFI Boot from ESP This will then start Windows on Disk2 partition 4. Were I to select the left hand one it would say Boot Microsoft EFI Boot from EFI and start Windows on Disk0 partition 3 (see partitions below).

These are picked up automatically using refind.conf like this (the manual stanza for Windows 10 is disabled as it always showed it on the right hand side that I didn't like):

timeout 5
use_nvram false

# UI
hideui hints,arrows,badges
banner themes/colourful/10-6.png
selection_big   themes/colourful/selection_big.png
selection_small themes/colourful/selection_small.png
showtools shell,csr_rotate,apple_recovery,shutdown

# mac stuff
csr_values 10,77
spoof_osx_version 10.9
enable_and_lock_vmx true

# search locations
scanfor internal,external,biosexternal,optical,manual
dont_scan_volumes "RECOVERY","FAT VOLUME","Windows"
#dont_scan_dirs +,EFI:/EFI/Boot,EFI:/EFI/GRUB,C12A7328-F81F-11D2-BA4B-00A0C93EC93B:/EFI/Microsoft
dont_scan_dirs +,EFI:/EFI/Boot,EFI:/EFI/GRUB

menuentry "Windows 10" {
    icon \EFI\refind\myicons\os_win_old.png
    loader \EFI\Microsoft\Boot\bootmgfw.efi
    disabled
}

These are my physical partitions:

A1398% diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *251.0 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:         Microsoft Reserved                         16.8 MB    disk0s2
   3:       Microsoft Basic Data Windows                 68.2 GB    disk0s3
   4:           Windows Recovery                         1.1 GB     disk0s4
   5:       Microsoft Basic Data Data                    107.4 GB   disk0s5
   6:           Linux Filesystem                         12.9 GB    disk0s6
   7:                 Apple_APFS Container disk1         53.7 GB    disk0s7

/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *250.1 GB   disk2
   1:                        EFI ESP                     209.7 MB   disk2s1
   2:                  Apple_HFS SamsungHFS              76.3 GB    disk2s2
   3:                 Apple_APFS Container disk3         50.0 GB    disk2s3
   4:       Microsoft Basic Data SamsungNTFS             85.2 GB    disk2s4
   5:       Microsoft Basic Data exFAT                   26.8 GB    disk2s5
   6:           Linux Filesystem                         10.7 GB    disk2s6

I have 2 disks and ESP is the volumes name of one of the EFI partitions. The volume names are not important - I just named the internal one EFI and the external one ESP so I could remember the difference.

Both ESP and EFI volumes contain a directory EFI/Microsoft/Boot and both contain the Microsoft bootloader bootmgrfw.efi and within the same directory the BCD file.

rEFInd calls the chosen bootmgrfw.efi which can see NTFS (so there is no need for the rEFInd NTFS driver) and this looks at the BCD file in its own directory which defines which Windows bootloader to run.

EFI partition

Each instance of Windows BCD has only one entry (it's own) and so selecting the relevant icon in rEFInd boots the separate Windows instance direct without the Windows bootloader asking anything.

This you set on the boot tab in msconfig in Windows where in each instance of Windows you define only the one boot entry.

It may be possible to duplicate this behavior with only one EFI partition by copying the whole of EFI/Microsoft/Boot to EFI/Boot or creating a second EFI partition on the same disk but I haven't tried this as I only want second Windows instance to be available when the external drive is connected.

1
  • WOW - you're the man lx07! Thanks a lot!
    – Flo
    Dec 28, 2019 at 22:47
0

I hope you've figured out your install. I wanted to post my findings here for future seekers of the truth.

@lx07's answer is great. My situation was slightly different to theirs (and from what I can tell, similar to yours) in that I did not have a second Windows EFI partition.

rEFInd needs a separate EFI partition for each operating system you want listed. To make a new EFI partition for your second Windows install, we need to use bcdboot on Windows:

With admin rights on Windows, run diskpart (you can also do this using installation/recovery media). We will use this program to manage the partitions on our disk.

If you have multiple disks:

list disk
select disk #

where # is the number of the disk you're adding the EFI partition to.

Then:

list partition
select partition # 

where # is the number of the partition where Windows is installed. Remember this should be the Windows install without its own EFI partition. In my case this was the Windows I installed second. You should be able to figure out which Windows doesn't have an EFI partition by looking at how the partitions are organised.

We can then shrink this partition, and make a new EFI partition:

shrink desired = 100
create partition efi size = 100
format quick fs = fat32

Assign it the drive letter S, and make a note of the drive letter of the Windows partition we're making the EFI for:

select partition #
assign letter = S
list partition
list volume
exit

where # is the partition number of our new EFI partition.

We can then use bcdboot to make the EFI.

bcdboot X:\windows /s S: /f UEFI

where X is the drive letter of our Windows install.

You should now be able to boot directly into your second install of Windows by selecting the right EFI option in the boot menu. rEFInd should automatically look for installs on load, and should now have two bootable Windows options. You might need to change around the boot order and stuff like that.

To get rid of Windows Boot Manager from appearing on your first Windows install, on Windows go to System > About > Advanced system settings. Go to the Startup and Recovery settings and set your first Windows install to default. Untick the first tickbox Time to display list of operating systems and it should now skip the boot manager.

There's probably a better way to do this (by remaking the EFI of our first Windows install?) but this works for me and I have no desire to mess with boot settings unless absolutely needed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .