I have a new computer with 2 nvme drives. I initially install windows 10 on one of the drives. Did not notice, but during the installation windows 10 placed its UEFI partition in the disk that was intended for Ubuntu (not in the windows SSD). I installed Ubuntu (with zfs) on the second disk. As expected, this type of installation wiped out the windows UEFI partition. I was able to repair the windows 10 boot and I am able to boot windows directly by selecting the windows disk from the bios boot menu or by using efibootmgr -n and selecting the windows partition. I was not able to add windows to grub. os-prober did not detect the windows partition. Then manually I edited the /etc/grub.d/40_custom file as follows:
menuentry "Windows 10" --class windows --class os {
insmod ntfs
insmod chain
insmod search_fs_uuid
search --no-floppy --set=root --fs-uuid D474C38D74C370B2
# ntldr /bootmgr
# chainloader /bootmgr
chainloader +1
}
Everything up to the last line was verified to be correct, when testing in the grub rescue shell.
if I use ntldr /bootmgr then grub is complaining that it cannot find ntldr. None of the chainloader lines listed above work as well. Any ideas ho to fix.