Why can’t grub find the disk by UUID?

I’m trying to troubleshoot why I can’t boot to Windows.

The relevant entry in grub.cfg is:

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/sda3)' --class windows --class os $menuentry_id_option 'osprober-efi-BC6E-0415' {
        insmod part_gpt
        insmod fat
        set root='hd0,gpt3'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  BC6E-0415
          search --no-floppy --fs-uuid --set=root BC6E-0415
        chainloader /efi/Microsoft/Boot/bootmgfw.efi

Best I can tell, everything here is correct:
/dev/disk/by-uuid/BC6E-0415 is indeed the Windows boot manager partition.

However I’m slightly confused by the references to (hd0,gpt3) because that’s a completely different partition on a completely different physical disk. hd0 is the disk on which grub is installed though, in case that’s relevant.

The actual error I get when I try and boot Windows is:

error: no such device: BC6E-0415
error: file `/efi/Microsoft/Boot/bootmgfw.efi' not found

I do notice that in grub, if I drop to a grub command prompt and do an ls, the only hard disk I see listed is hd0 when my system actually has 4 hard disks. As I mentioned above, hd0 is the hard disk that has grub and my Linux installs.

So I think my question might be: why, when I boot to grub, can’t grub see any hard disks besides the one grub is on?

If I boot into Linux (Ubuntu 20.04.1) I can see all my hard disks just fine.

Go to Source
Author: Bridgey