[dual boot] windows 10 not EFI -- GRUB2 can not boot nore probe

I suffered to have 15.2 installed on a old 15.1 version.
It started by no KDE at boot after motherboard/proc/mem change.

Now 15.2 is running.
BUT I previously installed Windows 10 on this computer counting on the fact I NEVER HAD SUCH ISSUE SINCE 2006 !!

Problem is, usually windows bootloader is choosen instead of GRUB2 and we have to pass modify thru bcdedit the boot manager…
This time this GRUB2 that is selected and windows 10 is not probed nore visible in GRUB2.

I tried to find a way to boot it custom but it fails.

/dev/sda1  *        2048   1026047   1024000  500M  7 HPFS/NTFS/exFAT
/dev/sda2        1026048  92162047  91136000 43.5G  7 HPFS/NTFS/exFAT
/dev/sda3       92162048  92686335    524288  256M ef EFI (FAT-12/16/32)
/dev/sda4       92686336 234441647 141755312 67.6G 83 Linux

Those partitions /dev/sda1 /dev/sda2 were created during Windows installation I actually wiped out all the old partitions on the disk.
The partitions /dev/sda3 /dev/sda4 were created during Linux installation.

15.2 never granted me to not create /dev/sda3… it was required to continue installation process.

The part concerning GRUB2 is here:

        insmod part_msdos
        insmod ntfs
        insmod search_fs_uuid
#        insmod ntldr
        search --no-floppy --fs-uuid --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 86348D33348D2771 #F8DC-BA04
        set root='hd0,msdos2'
#        drivemap (hd1,msdos2) (hd0,msdos2)
#        ntldr (hd0,msdos1)/bootmgr
         chainloader /Windows/Boot/bootmgr.efi

Code examples comming from different forums… related to EFI/NOn efi issues.

On the bIOS, I tried to modify the boot priority between AHPI and EFI but in this case none of the entry for GRUB2 could be launched.

Clearly Windows 10 did not created a EFI that could be probed by GRUB2.

When mounting /dev/sda1 I could only found bootmgr… and bcd related files.
When mounting /dev/sda2 there is a EFI at /Windows/Boot/EFI/bootmgr.efi

Do I copy the /Windows/Boot folder to /boot/efi/EFI folder ?

I got a “file not found” at grub2…

Changes in grub2.cfg

menuentry 'Microsoft Windows 10 de merde' --class windows {
#        insmod part_msdos
 #       insmod ntfs
 #       insmod search_fs_uuid
#        insmod ntldr
 #       search --no-floppy --fs-uuid --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 86348D33348D2771 #F8DC-BA04
#        set root='hd0,msdos2'
#        drivemap (hd1,msdos2) (hd0,msdos2)
#        ntldr (hd0,msdos1)/bootmgr
#         chainloader (hd0,msdos2)/Windows/Boot/bootmgr.efi
    search --fs-uuid --no-floppy --set=root F8DC-B404
    chainloader (${root})/EFI/windows10/bootmgr.efi
}

Don’t know (documentation lacking) if I’m right… I refering to:

https://unix.stackexchange.com/questions/405916/how-to-start-windows-10-through-grub-command-line/405923
https://askubuntu.com/questions/661947/add-windows-10-to-grub-os-list

…as the EFI the system seems to follow is the one in /dev/sda3 (seen as opensuse in the BIOS)…
so I blkid’d the /dev/sda3 partition (F8DC-B404)

I copied the EFI related stuff from the windows partition to /boot/efi/EFI in windows10 folder before this step so now I have a better “feeling”…

/EFI seems to be an alias for /boot/efi/EFI

I reboot and try and come back ^^

FAILURE :{

changes done to grub.cfg (an uuid is unreadable can’t understand why it is used)

menuentry 'Microsoft Windows 10 de merde' --class windows {
        insmod part_msdos
        insmod ntfs
        insmod search_fs_uuid
        search --fs-uuid --no-floppy --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 --hint='hd0,msdos3' F8DC-B**A**04
        chainloader (hd0,msdos3)/EFI/windows10/bootmgr.efi
}

GRUB says can not load image…

I verified and I got a shim.efi that is generated thru the command

**bcdedit /set {bootmgr} path \EFI\opensuse\shim.efi**

…so…

…do I modify the path in Grub ?

What to do with this file ?

sirius:/boot/efi/EFI/opensuse # ls -lah
total 4.0M
drwxr-xr-x 2 root root 4.0K Sep 12 18:09 .
drwxr-xr-x 5 root root 4.0K Sep 13 12:10 ..
-rwxr-xr-x 1 root root 1.3M Sep 12 18:09 MokManager.efi
-rwxr-xr-x 1 root root   58 Sep 12 18:09 boot.csv
-rwxr-xr-x 1 root root  155 Sep 12 18:09 grub.cfg
-rwxr-xr-x 1 root root 1.2M Sep 12 18:09 grub.efi
-rwxr-xr-x 1 root root 308K Sep 12 20:26 grubx64.efi
-rwxr-xr-x 1 root root 1.3M Sep 12 18:09 shim.efi

note that file shim.efi wasn’t the one created today…

I got message indicating that windows is unable to boot and sent me to the system repair by the install dvd…

I can have a prompt but as this is not the mounted and booted windows I think bcdedit has no effect in reality…

Relax! Dual boot is as easy as can be: How to Install Windows 10 for Free - Forums Feedback - openSUSE Forums

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-efi-6B6D-1CDE' {
        insmod part_gpt
        insmod fat
        set root='hd0,gpt1'
        if  x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  6B6D-1CDE
        else
          search --no-floppy --fs-uuid --set=root 6B6D-1CDE
        fi
        chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/30_os-prober ###

osprober knows best how to add Windows Boot Manager.

When you tell me that, it makes me wonder whether Windows is installed for legacy BIOS booting, with openSUSE installed for UEFI booting. Or do you have another disk drive there that you didn’t mention?

Exactly ^^

What I did: take on my frustration to go to BIOS and select the hard disk to boot on windows.

Once on windows, as an administrator, I used the bcdboot utility.

bcdboot c:\Windows /s D: /f ALL

D: is the letter concerning the EFI partition that I created using gdisk longtime before installing windows 10 and linux.

And that is all, after that I had to return to the opensuse EFI boot partition.

os-prober
grub2-mkconfig -o grub.cfg in /boot/grub2

…and now my system is fully operationnal as wanted (error messages in windows concerning missing dll but I think I would solve this)

General principle: If Windows is installed for legacy BIOS booting, then you must use legacy BIOS booting also for openSUSE.

Similarly, if Windows is installed for UEFI booting, then you must use UEFI booting for openSUSE. Otherwise dual booting becomes a problem.

It is more flexible if you are only using linux, because grub takes care of all of the boot details. So the installed linux system doesn’t care how it is booted. But Windows does care, and can only be booted the way that it was installed.