Dual boot issue: Windows boots only after entering UEFI first even without changing its config. (grub error: no such device)"

Hellooo,
Im very very new to linux and so pretty noob, so this problem Its probably kinda easy to fix but I do not find the way.

My PC:

  • EndeavourOS installed on NVMe (/dev/nvme0n1)
  • Windows 11 installed on SSD (/dev/sda)
  • Dual boot managed by GRUB
  • UEFI mode (not Legacy BIOS)

Problem:
GRUB boots Windows only if GRUB Its booted right after the UEFI (even if I dont change anything in the UEFI). Otherwise (ex. first boot or after rebooting from linux) when Im trying to boot windows GRUB gives me these errors:

error: no such device: 7026-6494.
error: file “/efi/Microsoft/Boot/bootmgfw.efi” not found.

It seems like GRUB can boot windows ONLY if booting after rebooting from UEFI (even without touching the UEFI config).

What I did:
Grub Configuration should be ok:

  • In /etc/default/grub the GRUB_DISABLE_OS_PROBER=false its uncommented.

  • In /boot/grub/grub.cfg there is the Windows Boot Manager entry:

menuentry 'Windows Boot Manager (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-efi-7026-6494' {
        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  7026-6494
        else
          search --no-floppy --fs-uuid --set=root 7026-6494
        fi
        chainloader /efi/Microsoft/Boot/bootmgfw.efi
}
  • Once I “apply“/update the grub config with sudo grub-mkconfig -o /boot/grub/grub.cfg, It does find bootmgfw.efi:
Generating grub configuration file ...
Found background: /usr/share/endeavouros/splash.png
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  initramfs-linux-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/sda1@/efi/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
done

  • Im pretty confident the “7026-6494“ is right.

Other infos:

My motherboard is: ASUS PRIME B760M-A WIFI
The secure boot is disabled

I guess Its not a big deal but if you have any clue, please reply.

Yea it was more easy than i thought.
The solution was disabling fast boot
The problem I guess was that GRUB didn’t have enough time to scan the windows efi? So everytime it rebooted from the UEFI I guess It took more time so grub could scan the windows efi. Im not sure buuut now It works.

I’ve never seen a case of a grub bootloader and a systemd boot living together in harmony.

Maybe I’m not getting it (likely). Congrats tho you figured it out.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.