Boot entry for Windows is missing in dual boot installation

@flo37 Hi, you can use efibootmgr to add an entry. Or in your system BIOS, can you select from there?

Hm. Using the command efibootmgr would save me the effort of installing Leap again, but it has very many options and the documentation (also on the internet) is quite unclear about them. All the examples for creating a new boot entry use several of the options (-d -p -l -L -u) whose values I wouldn’t know (apart from the default, which would assume a linux OS on /dev/sda1, which is not my case).
So I am afraid of messing up the whole grub.

Should it work with just:
efibootmgr -c /dev/nvme0n1p4 -L "Windows" ?

Currently, efibootmgr gives:

BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0003,0002,0004
Boot0000* opensuse-secureboot   HD(1,GPT,adb7b20f-f490-439d-a93e-adc3f5bc75b4,0x3a800,0x100000)/File(\EFI\opensuse\shim.efi)
Boot0002* Solid State Disk      PciRoot(0x0)/Pci(0xe,0x0)/NVMe(0x1,5C-D2-E4-55-11-90-98-C6)/HD(4,GPT,0cdd634a-8bed-4f81-a38a-e5eb58c29046,0x49f98000,0x100000)0000424f
Boot0003* Solid State Disk      PciRoot(0x0)/Pci(0xe,0x0)/NVMe(0x2,5C-D2-E4-54-58-59-01-00)/HD(1,GPT,adb7b20f-f490-439d-a93e-adc3f5bc75b4,0x3a800,0x100000)0000424f
Boot0004* USB Drive (UEFI) -  USB       PciRoot(0x0)/Pci(0x14,0x0)/USB(12,0)/HD(1,MBR,0xb0f82e54,0x800,0x4000000)0000424f

And I can boot Windows via the BIOS now. I had to choose ā€œboot EFI fileā€, then navigate to an *mfg.efi entry (choosing the Windows boot loader directly did not work, but redirected me to grub).
As a result of booting Windows via the BIOS, the laptop is now booting into Windows by default and I have to choose the opensuse boot loader in the BIOS, if I want to get to Leap…

@flo37 Hi, it would be;

efibootmgr -c -d /dev/nvme0n1 -p 4 -L "Windows Boot Manager" -l "\EFI\Microsoft\Boot\bootmgfw.efi"

OK. This created the windows boot entry in the list in efibootmgr (I found a few days ago, the same entry was created automatically when I booted Windows from the BIOS via ā€œboot efi fileā€ as I wrote above). Since then, the windows boot entry is available as choice in the BIOS boot menu.

However, it did not add anything to the list of choices in GRUB.

So, I can now choose in the BIOS to boot opensuse or Windows, but still not in the GRUB menu.

Here’s what efibootmgr shows now:

BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0006,0001,0000,0003,0002,0004
Boot0000* opensuse-secureboot   HD(1,GPT,adb7b20f-f490-439d-a93e-adc3f5bc75b4,0x3a800,0x100000)/File(\EFI\opensuse\shim.efi)
Boot0001* opensuse-secureboot   HD(4,GPT,0cdd634a-8bed-4f81-a38a-e5eb58c29046,0x49f98000,0x100000)/File(\EFI\opensuse\shim.efi)
Boot0002* Solid State Disk      PciRoot(0x0)/Pci(0xe,0x0)/NVMe(0x1,5C-D2-E4-55-11-90-98-C6)/HD(4,GPT,0cdd634a-8bed-4f81-a38a-e5eb58c29046,0x49f98000,0x100000)0000424f
Boot0003* Solid State Disk      PciRoot(0x0)/Pci(0xe,0x0)/NVMe(0x2,5C-D2-E4-54-58-59-01-00)/HD(1,GPT,adb7b20f-f490-439d-a93e-adc3f5bc75b4,0x3a800,0x100000)0000424f
Boot0004* USB Drive (UEFI) -  USB       PciRoot(0x0)/Pci(0x14,0x0)/USB(12,0)/HD(1,MBR,0xb0f82e54,0x800,0x4000000)0000424f
Boot0006* Windows Boot Manager  HD(4,GPT,f37865be-f9e4-4f00-9182-0d362e55e6b8,0x13a800,0x303e800)/File(\EFI\Microsoft\Boot\bootmgfw.efi)

By the way, since booting Windows from the BIOS, the Windows Boot Manager used to be Boot0005. Running efibootmgr as suggested above created the same entry as Boot0006 with the remark that this entry is double, then the Boot0005 entry was automatically deleted.

EDIT:
The newly added bootloader option boot0006 did not work: Windows was not booting from it but offering a repair menu (that does never work) and boots the opensuse bootloader in the end.

I booted Windows from the BIOS via ā€œboot efi fileā€ again and that changed the boot entries back. They now read again:

efibootmgr
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0005,0000,0001,0003,0002,9999
Boot0000* opensuse-secureboot   HD(1,GPT,adb7b20f-f490-439d-a93e-adc3f5bc75b4,0x3a800,0x100000)/File(\EFI\opensuse\shim.efi)
Boot0001* opensuse-secureboot   HD(4,GPT,0cdd634a-8bed-4f81-a38a-e5eb58c29046,0x49f98000,0x100000)/File(\EFI\opensuse\shim.efi)
Boot0002* Solid State Disk      PciRoot(0x0)/Pci(0xe,0x0)/NVMe(0x1,5C-D2-E4-55-11-90-98-C6)/HD(4,GPT,0cdd634a-8bed-4f81-a38a-e5eb58c29046,0x49f98000,0x100000)0000424f
Boot0003* Solid State Disk      PciRoot(0x0)/Pci(0xe,0x0)/NVMe(0x2,5C-D2-E4-54-58-59-01-00)/HD(1,GPT,adb7b20f-f490-439d-a93e-adc3f5bc75b4,0x3a800,0x100000)0000424f
Boot0005* Windows Boot Manager  HD(4,GPT,0cdd634a-8bed-4f81-a38a-e5eb58c29046,0x49f98000,0x100000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d000000ffff0100000010000000040000007fff0400
Boot9999* USB Drive (UEFI)      PciRoot(0x0)/Pci(0x1d,0x0)/USB(16,0)0000424f

and I can choose either opensuse or Windows from the BIOS (but still not in GRUB).

@flo37 So you can change the order with efibootmgr -o likewise you need to look at the output from blkid to see which one is used for openSUSE either 0 or 1 and remove the surplus entry.

If you run update-bootloader --config should add the entry, assuming you see the windows entry in the output from os-prober.

1 Like

Thank you, that’s it!
Everything works as it used to be with a dual boot installation now.

One remark for others: I read in another thread that it’s necessary to change the boot order such that opensuse is booted as first system, before running update-bootloader. For doing this, I was puzzled with the syntax of efibootmgr -o XXXX,YYYY,ZZZZ for giving the order of boot entries. I got Malformed BootOrder order0000,. It turned out, the entries really must be given without spaces between the ā€œ,ā€. So e.g. efibootmgr -o 0000,0005,0001,0003,0002,9999.

Dear @malcomlewis: Thank you for your patience and the enormous effort of directing me right!