I have two ssd which there is Windows 10 on the /dev/sda1 and OpenSuse on /dev/sda3 (/dev/sda2 is for a storage hdd). I have been installed Ubuntu on my /dev/sda3 couple months ago. But because of some personal reasons I have decided to go with OpenSuse. So I have installed OpenSuse on my /dev/sda3 a week ago. When I was using my /dev/sda3 with Ubuntu, my boot order was /dev/sda3 than /dev/sda1. And when I boot up my machine, grub was booting the system. And it can detect Ubuntu while Windows 10 which was on my /dev/sda1.But after I formatted my /dev/sda3 and have install OpenSuse on my /dev/sda3, newly installed grub, which comes with OpenSuse, was not able to detect Windows 10, with the same boot order.So I have check some forums and tried many different things like os-prober or update-bootloader but nothing worked. And after those tries I found a stackoverflow wiki question about how to Dual boot windows on second harddrive, UEFI/GPT system. I have followed this step by step.After completed it, first try was failed. Here is my /etc/grub.d/40_custom look like,#!/bin/shexec tail -n +3 $0# This file provides an easy way to add custom menu entries.  Simply type the# menu entries you want to add after this comment.  Be careful not to change# the 'exec tail' line above.menuentry MS Windows {        insmod part_gpt        insmod search_fs_uuid        insmod ntfs        insmod chain        search --fs-uuid --no-floppy --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 685EBC705EBC3920        chainloader /Windows/Boot/EFI/bootmgfw.efi}To create it I followed those steps, (I just re-write the same steps with the link above if I make something wrong...)1) find the mount path of the windows 10 disk, which is for my case, /run/media/cavit/685EBC705EBC3920,2) make a env var of it as win,3) find the efi of the windows which gives me, /Windows/Boot/EFI/bootmgfw.efi,4) grub2-probe --target=hints_string $win gives --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 --hint='hd2,gpt4',5) grub-probe --target=fs_uuid $win gives, 685EBC705EBC3920,6) I did not drivemap because my Windows 10 disk already first one.7) find /boot -name grub.cfg gives, /boot/grub2/grub.cfg,8) grub-mkconfig -o /boot/grub2/grub.cfg gives an output like that,Generating grub configuration file ...Found theme: /boot/grub2/themes/openSUSE/theme.txtFound linux image: /boot/vmlinuz-4.4.2-1-defaultFound initrd image: /boot/initrd-4.4.2-1-defaultFound linux image: /boot/vmlinuz-4.4.1-1-defaultFound initrd image: /boot/initrd-4.4.1-1-defaultFound memtest image: /boot/memtest.bindone9) grub-script-check /boot/grub/grub.cfg gives no any output.But on my first attempt after I reboot and select that new entry, grub gave an output can't find command chainload. On the original post, last line of code of the /etc/grub.d/40_custom was chainload (${root})/Windows/Boot/EFI/bootmgfw.efi so I just thought if that command revised to chainloader. So I tried if it is and this time I got an error as Error: Invalid Signature.On the other hand, a wierd partition is present on my Windows 10 disk (/dev/sda1). There is an extra partition which I don't understand why it is present. Here is my blkid output,/dev/sda1: LABEL=Recovery UUID=6AC8BAAFC8BA78C1 TYPE=ntfs PARTLABEL=Basic data partition PARTUUID=83e0d3c4-f90b-4f2f-8f8b-500b1f773d5d/dev/sda2: UUID=08BA-F986 TYPE=vfat PARTLABEL=EFI system partition PARTUUID=4c3e9d7b-1f9c-49e7-8bfe-83d1e3d778b4/dev/sda3: PARTLABEL=Microsoft reserved partition PARTUUID=2686e370-0de7-466c-85b7-1e6594f6eb56/dev/sda4: UUID=685EBC705EBC3920 TYPE=ntfs PARTLABEL=Basic data partition PARTUUID=901c7e27-71f0-4e61-9626-095783661f2don the /dev/sda2 there is EFI folder, here is the tree structure,EFI                                                                                                                                                                             Boot                                                                                                                                                                       bootx64.efi                                                                                                                                                           Microsoft                                                                                                                                                                  Boot                                                                                                                                                                    BCD                                                                                                                                                                 BCD.LOG                                                                                                                                                             BCD.LOG1                                                                                                                                                            BCD.LOG2                                                                                                                                                            bootmgfw.efi                                                                                                                                                        bootmgr.efi                                                                                                                                                         BOOTSTAT.DAT                                                                                                                                                        boot.stl        kd_02_10df.dll   kd_02_10ec.dll   kd_02_1137.dll   kd_02_14e4.dll   kd_02_15b3.dll   kd_02_1969.dll   kd_02_19a2.dll   kd_02_8086.dll   kd_07_1415.dll   kd_0C_8086.dll   kdstub.dll  Recovery      BCD      BCD.LOG      BCD.LOG1      BCD.LOG2 ubuntu     grub.cfg     grubx64.efi     MokManager.efi     shimx64.efiSo I do not know if where am I wrong and why this ubuntu folder is in my EFI dir. And seems like there is no more forums or wiki that I can check to solve it. So is there a way to fix this grub detection for Windows 10?Note: I have close hibernation on Windows and disabled fast boot etc.
Grub2 can't detect Windows 10, Dual boot on two harddrive, UEFI/GPT system
linux;windows;grub2;dual boot;uefi