Windows missing in Grub2 Efi menu

Hi
Unfortunately I have to have keep a dualboot option with Leap 15.2 and Windows 10 on my desktop computer in order to use a certain slide-scanner software, that will not run in linux (despite efforts…).
I have two SSDs in the computer; sda for Opensuse and sdb for Windows and It has worked until recently. Why the Windows option went missing I can not tell. It was not something that I did actively.

I have read several posts to try to fix the issue myself and I have made these two commands to get info:

localhost:/home/soren # efibootmgr -v
BootCurrent: 0002
Timeout: 3 seconds
BootOrder: 0002,0003,0000
Boot0000* opensuse-secureboot   HD(2,GPT,cccf3b96-6829-4e45-bfd4-cbd7c095171c,0x4800,0xfa000)/File(\EFI\OPENSUSE\SHIM.EFI)
Boot0002* opensuse      HD(2,GPT,cccf3b96-6829-4e45-bfd4-cbd7c095171c,0x6294000,0xfa000)/File(\EFI\OPENSUSE\GRUBX64.EFI)..BO
Boot0003* opensuse      HD(2,GPT,cccf3b96-6829-4e45-bfd4-cbd7c095171c,0x4800,0xfa000)/File(\EFI\OPENSUSE\GRUBX64.EFI)..BO
localhost:/home/soren # blkid
/dev/sda1: UUID="b77f8b28-87f7-44c2-a64b-61034cf97f55" TYPE="ext2" PARTUUID="69fa5493-7e7b-49cd-8b2c-1cab665e5140"
/dev/sda2: SEC_TYPE="msdos" UUID="868A-6BDF" TYPE="vfat" PARTUUID="cccf3b96-6829-4e45-bfd4-cbd7c095171c"
/dev/sda3: UUID="55566329-3db6-4fa4-8ea5-19015aada123" UUID_SUB="fa7466aa-eaa4-4771-93ff-2e091b2eea7e" TYPE="btrfs" PARTUUID="4d7cd186-2aa5-4e69-a76d-11efefd9f1ff"
/dev/sda4: UUID="a13607c4-be9a-4356-8800-f6547cca46e4" TYPE="swap" PARTUUID="e262ba3b-27bd-42e9-8b0f-5cc619314c90"
/dev/sda5: UUID="88f66972-9888-4b7a-a5a2-405d79ccb02c" UUID_SUB="0b7d4673-eb12-4ef9-9c7c-28237b7bca26" TYPE="btrfs" PARTUUID="64468fa7-13bc-424f-b0b2-100c4bb24bc8"
/dev/sdb1: LABEL="Genoprettelse" UUID="1872FB1672FAF6FA" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="dc8b28d2-e254-43ad-b1ef-d450dd176d7e"
/dev/sdb2: UUID="2004-0144" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="509772ac-8c8c-40d2-98be-38f1f541160d"
/dev/sdb3: PARTLABEL="Microsoft reserved partition" PARTUUID="47b0e236-35ae-4fe9-9687-ca91836bf938"
/dev/sdb4: UUID="08320F2B320F1CF6" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="505fb991-08b3-48aa-80a0-5ecbc43b400b"
/dev/sdb5: UUID="10D42506D424EFA0" TYPE="ntfs" PARTLABEL="sdb1" PARTUUID="f78f7078-66ad-463f-bf8e-426e3f4da199"

How do I get Windows back as an option in Grub"

LABEL=“Genoprettelse” means LABEL=Restore (in Danish)

Thank You ind advance!

Hi
Likely unchecked the YaST2 bootloader entry to ‘probe foreign os’? If you run the following command as root user;


os-prober

Do you see the Windows entry appear?

os-prober

creates an empty return…

Hi
So if you look down in /boot/efi/EFI directory on /dev/sdb2 is there a MS directory?

I cannot get access to dev/sdb2 - access denied - even as root.

Hi
It should be mounted?


ls -la /boot/efi/EFI


localhost:/home/soren # ls -la /boot/efi/EFI
totalt 40
drwxr-xr-x 4 root root  8192 25 okt  2019 .
drwxr-xr-x 3 root root 16384  1 jan  1970 ..
drwxr-xr-x 2 root root  8192 28 aug 00:29 boot
drwxr-xr-x 3 root root  8192  7 dec  2019 opensuse

Hi
Looks like you will need to boot from the Windows media and fix booting. Now have you tried booting from the BIOS boot menu? Your sure that the windows install was UEFI boot and not legacy?

Thank You I will try that option - and no - I am not sure that Windows were installed in UEFI mode - I was probably not even aware of the possible issues at installation time.

What makes you believe /boot/efi is /dev/sdb2 and not /dev/sda2?

Hi
Could be, but this is actually labelled as the efi partition…


/dev/sdb2: UUID="2004-0144" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="509772ac-8c8c-40d2-98be-38f1f541160d" 

I tried booting from a Win10 media and found out that it was not able to boot or even install with the given partition.I then tried to reinstall windows on a wiped sdb drive - still without success. It kept claiming that the efi-system disk was of wrong format, even though I had carefully formatted it as the required FAT32.

So I thought that it could be that the presence of sda disk (with its partitions) was confusing the windows installer, so as a final resort I physically unplugged the sda disk.
I was then able to install Windows from scratch at the sdb disk.

After re-plugging the sda disk, grub perfectly finds the Win 10 system and I am calm and can continue scanning old slides - which is the only reason I have to keep Win 10.
Thanks for the help!

FWIW

I have two boxes running 15.1 and 15.2 Plasma, both dual-booting with windows 10.
Every now and then grub loses the windows entry, AFAICS after an update.
The simplest way to fix this, for me, is to go into Yast>bootloader, check that “probe foreign OS” is checked (it always is), make a minor edit (like the boot menu timeout), and save changes. Then windows entry is back.

After update of Windows or Linux? Do you use legacy BIOS or UEFI boot?

Linux & UEFI. Larger Windows updates sometimes make the boxes boot straight into it, losing the grub menu entirely. Fixing this is also simple: boot into openSUSE from UEFI and run Yast’s bootloader again.

This is completely opposite to what you stated before.

Before I was commenting on the OP issue. Then you asked “After update of Windows or Linux?”, so I commented that it also happened sometimes after windows update, but that it kills grub entirely, booting straight to windows.

Sorry if it confused you.