Grub is unable to boot to windows

I’ve recently installed fresh installation of eos migrating from gnome to xfce on my external drive.
Unfortunatelly, when booting to usb and choosing Windows instead of Linux in the grub menu, i get the following output:

error: no such device: ****-****.
error: file '/efi/Microsoft/Boot/bootimgfw.efi' not found

How can I fix this?
I have already disabled the Fast Boot option.

How about booting your Windows without connecting your external disk? Does Windows boot up?

Also for those people who may be able to help, please post the output of the following commands to give them something to bite:

sudo parted -l

efibootmgr

sudo tree /boot/efi

Yeah, but I need to run it from grub and not switching the boot device in bios each time I turn on the machine.

sudo parted -l:

Model: Samsung Flash Drive FIT (scsi)
Disk /dev/sda: 257GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start  End    Size   Type     File system  Flags
 1      131kB  257GB  257GB  primary


Model: Samsung Flash Drive FIT (scsi)
Disk /dev/sdb: 257GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name  Flags
 1      1049kB  538MB   537MB   fat32                 bios_grub
 2      538MB   16.5GB  16.0GB  linux-swap(v1)        swap
 3      16.5GB  257GB   240GB   ext4


Model: SKHynix_HFS001TDE9X084N (nvme)
Disk /dev/nvme0n1: 1024GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                          Flags
 1      1049kB  274MB   273MB   fat32        EFI system partition          boot, esp
 2      274MB   290MB   16.8MB               Microsoft reserved partition  msftres
 3      290MB   1022GB  1022GB  ntfs         Basic data partition          msftdata
 4      1022GB  1024GB  2097MB  ntfs         Basic data partition          hidden, diag, no_automount

efibootmgr:

BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 2001,0004,2002,2003
Boot0000* EFI USB Device (Samsung Flash Drive FIT)	UsbWwid(90c,1000,0,030712309000349)/HD(1,GPT,952247d6-a58c-4143-83d3-fd82a8202a8e,0x800,0x100000)RC
Boot0004* Windows Boot Manager	HD(1,GPT,8d060131-9319-4f02-ae7f-87f6848d170d,0x800,0x82000)/\EFI\Microsoft\Boot\bootmgfw.efi57494e...
Boot2001* EFI USB Device	RC
Boot2002* EFI DVD/CDROM	RC
Boot2003* EFI Network	RC

sudo tree /boot/efi:

/boot/efi
└── EFI
    ├── boot
    │   └── bootx64.efi
    └── endeavouros
        └── grubx64.efi

4 directories, 2 files

this is a tricky question
your boot partition is bios-grub not boot & esp for UEFI

can you report

inxi -Fxza
test -d /sys/firmware/efi && echo efi || echo bios
System:
  Kernel: 6.10.2-arch1-2 arch: x86_64 bits: 64 compiler: gcc v: 14.2.1
    clocksource: tsc avail: acpi_pm parameters: BOOT_IMAGE=/boot/vmlinuz-linux
    root=UUID=9e7162c0-7bcf-4c3b-969f-884d43ace146 rw nowatchdog
    nvme_load=YES resume=UUID=e009d620-2329-4ae1-b833-f10d0940faec
    nvidia_drm.modeset=1 loglevel=3
  Desktop: Xfce v: 4.18.1 tk: Gtk v: 3.24.43 wm: xfwm4 v: 4.18.0
    with: xfce4-panel tools: xfce4-screensaver vt: 7 dm: LightDM v: 1.32.0
    Distro: EndeavourOS base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 82NC v: Yoga Slim 7 Pro 14IHU5
    serial: <superuser required> Chassis: type: 10 v: Yoga Slim 7 Pro 14IHU5
    serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: SDK0T76463 WIN
    serial: <superuser required> part-nu: LENOVO_MT_82NC_BU_idea_FM_Yoga Slim 7
    Pro 14IHU5 uuid: <superuser required> UEFI: LENOVO v: FJCN69WW
    date: 03/21/2022
Battery:
  ID-1: BAT1 charge: 11.8 Wh (21.5%) condition: 55.0/61.0 Wh (90.2%)
    power: 8.4 W volts: 14.7 min: 15.4 model: Sunwoda L19D4PH3 type: Li-poly
    serial: <filter> status: discharging
CPU:
  Info: model: 11th Gen Intel Core i5-11320H bits: 64 type: MT MCP
    arch: Tiger Lake gen: core 11 level: v4 note: check built: 2020
    process: Intel 10nm family: 6 model-id: 0x8C (140) stepping: 2
    microcode: 0x16
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 320 KiB desc: d-4x48 KiB; i-4x32 KiB L2: 5 MiB desc: 4x1.2 MiB L3: 8 MiB
    desc: 1x8 MiB
  Speed (MHz): avg: 690 high: 1045 min/max: 400/4500 scaling:
    driver: intel_pstate governor: powersave cores: 1: 400 2: 1045 3: 1009
    4: 990 5: 877 6: 400 7: 400 8: 400 bogomips: 51008
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling status: Vulnerable: No microcode
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Enhanced / Automatic IBRS; IBPB:
    conditional; RSB filling; PBRSB-eIBRS: SW sequence; BHI: SW loop, KVM: SW
    loop
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics] vendor: Lenovo
    driver: i915 v: kernel alternate: xe arch: Gen-12.1 process: Intel 10nm
    built: 2020-21 ports: active: eDP-1 empty: DP-1, DP-2, DP-3, DP-4
    bus-ID: 00:02.0 chip-ID: 8086:9a49 class-ID: 0300
  Device-2: Chicony Integrated Camera driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-1:2 chip-ID: 04f2:b6cb
    class-ID: fe01 serial: <filter>
  Display: x11 server: X.Org v: 21.1.13 compositor: xfwm4 v: 4.18.0 driver:
    X: loaded: modesetting alternate: fbdev,intel,vesa dri: iris gpu: i915
    display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 2240x1400 s-dpi: 96 s-size: 592x370mm (23.31x14.57")
    s-diag: 698mm (27.48")
  Monitor-1: eDP-1 model: AU Optronics 0x2698 built: 2020 res: 2240x1400
    hz: 60 dpi: 190 gamma: 1.2 size: 300x188mm (11.81x7.4") diag: 354mm (13.9")
    ratio: 16:10 modes: 2240x1400
  API: EGL v: 1.5 hw: drv: intel iris platforms: device: 0 drv: iris
    device: 1 drv: swrast gbm: drv: iris surfaceless: drv: iris x11: drv: iris
    inactive: wayland
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 24.1.5-arch1.1
    glx-v: 1.4 direct-render: yes renderer: Mesa Intel Xe Graphics (TGL GT2)
    device-ID: 8086:9a49 memory: 7.52 GiB unified: yes
Audio:
  Device-1: Intel Tiger Lake-LP Smart Sound Audio vendor: Lenovo
    driver: sof-audio-pci-intel-tgl alternate: snd_hda_intel, snd_soc_avs,
    snd_sof_pci_intel_tgl bus-ID: 00:1f.3 chip-ID: 8086:a0c8 class-ID: 0401
  API: ALSA v: k6.10.2-arch1-2 status: kernel-api
    tools: alsactl,alsamixer,amixer
  Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
  Server-2: PipeWire v: 1.2.2 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Wi-Fi 6 AX201 driver: iwlwifi v: kernel bus-ID: 00:14.3
    chip-ID: 8086:a0f0 class-ID: 0280
  IF: wlan0 state: up mac: <filter>
  Info: services: NetworkManager, systemd-timesyncd, wpa_supplicant
Bluetooth:
  Device-1: Intel AX201 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 3-10:3 chip-ID: 8087:0026
    class-ID: e001
  Report: btmgmt ID: hci0 rfk-id: 2 state: down bt-service: disabled
    rfk-block: hardware: no software: no address: N/A
Drives:
  Local Storage: total: 1.4 TiB used: 23.64 GiB (1.7%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: SK Hynix model: HFS001TDE9X084N
    size: 953.87 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: 41010C22 temp: 42.9 C
    scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Samsung model: Flash Drive FIT
    size: 239.02 GiB block-size: physical: 512 B logical: 512 B type: USB
    rev: 3.1 spd: 5 Gb/s lanes: 1 mode: 3.2 gen-1x1 tech: SSD serial: <filter>
    fw-rev: 1100 scheme: MBR
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
  ID-3: /dev/sdb maj-min: 8:16 vendor: Samsung model: Flash Drive FIT
    size: 239.02 GiB block-size: physical: 512 B logical: 512 B type: USB
    rev: 3.1 spd: 5 Gb/s lanes: 1 mode: 3.2 gen-1x1 tech: SSD serial: <filter>
    fw-rev: 1100 scheme: GPT
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition:
  ID-1: / raw-size: 223.61 GiB size: 219.04 GiB (97.96%)
    used: 23.64 GiB (10.8%) fs: ext4 dev: /dev/sdb3 maj-min: 8:19
  ID-2: /boot/efi raw-size: 512 MiB size: 511 MiB (99.80%)
    used: 296 KiB (0.1%) fs: vfat dev: /dev/sdb1 maj-min: 8:17
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default) zswap: yes
    compressor: zstd max-pool: 20%
  ID-1: swap-1 type: partition size: 14.9 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/sdb2 maj-min: 8:18
Sensors:
  System Temperatures: cpu: 40.0 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 16 GiB note: est. available: 15.41 GiB used: 2.06 GiB (13.4%)
  Processes: 263 Power: uptime: 15m states: freeze,mem,disk suspend: s2idle
    avail: deep wakeups: 0 hibernate: platform avail: shutdown, reboot,
    suspend, test_resume image: 6.12 GiB services: power-profiles-daemon,
    upowerd, xfce4-power-manager Init: systemd v: 256 default: graphical
    tool: systemctl
  Packages: pm: pacman pkgs: 932 libs: 240 tools: yay Compilers: gcc: 14.2.1
    Shell: Zsh v: 5.9 running-in: kitty inxi: 3.3.35
efi

Please, post commands output:

sed -n '/Windows/,/}/p' /boot/grub/grub.cfg
lsblk -fo +PARTUUID
1 Like
menuentry 'Windows Boot Manager (on /dev/nvme0n1p1)' --class windows --class os $menuentry_id_option 'osprober-efi-5E4A-BBDE' {
	insmod part_gpt
	insmod fat
	search --no-floppy --fs-uuid --set=root 5E4A-BBDE
	chainloader /efi/Microsoft/Boot/bootmgfw.efi
}
NAME        FSTYPE FSVER LABEL       UUID                                 FSAVAIL FSUSE% MOUNTPOINTS PARTUUID
sdb                                                                                                  
├─sdb1      vfat   FAT32             4F14-CC07                             510.7M     0% /boot/efi   952247d6-a58c-4143-83d3-fd82a8202a8e
├─sdb2      swap   1                 e009d620-2329-4ae1-b833-f10d0940faec                [SWAP]      516ddf2e-e6a3-4ea0-a281-ad6d519b5c44
└─sdb3      ext4   1.0               9e7162c0-7bcf-4c3b-969f-884d43ace146  184.2G    11% /           0d800cf5-9e24-4865-8100-3c2c1553fc9f
nvme0n1                                                                                              
├─nvme0n1p1 vfat   FAT32 SYSTEM_DRV  3410-9928                                                       8d060131-9319-4f02-ae7f-87f6848d170d
├─nvme0n1p2                                                                                          48dbb0be-b5e8-4d0b-9a1f-4850e0c6355a
├─nvme0n1p3 ntfs         Windows-SSD 2A281155281120FD                                                4238f75e-c3ec-495f-8d85-e098ac8eb8a7
└─nvme0n1p4 ntfs         WINRE_DRV   3AB4121FB411DDE7                                                fd9d8840-e63d-4b9e-810f-5b17e40ad129

Do you really need to be doing this? Shouldn’t Bios search for the boot entries and try them one after the other until it finds the first bootable entry for a connected device and use that?

With that said, your Windows’ menu entry in grub.cfg looks correct to me.

I am not sure why Grub is looking for:

bootimgfw.efi ??

Or is it this the problem:

├─nvme0n1p1 vfat FAT32 SYSTEM_DRV 3410-9928

search --no-floppy --fs-uuid --set=root 5E4A-BBDE

How are you creating the Windows menuentry in grub.cfg?

1 Like

Purely out of comfortability, I’d like it to be able to boot from grub. I agree it’s avoidable, but my question aims to that.

I am partially still a newbie to linux, I have never configured grub any further than the visual appearance in Grub Customizer. That said, the menuentry was created automatically with the EOS installation…
But! Thinking about that, I installed the EOS on another device with Windows 11 system, than I’am currently using. Although when I was using EOS on my previous install, it worked fine on both devices.

UPDATE:

I've tried it out on the machine I've installed the EOS on and there it boots to windows from grub normally.

Personally, I would look into this. It seems that the UUID for the partition in which Grub is looking for boot files is not set correctly.

Have you already used Grub Customizer in this system?

No, I haven’t.

Did you try reinstalling grub as i posted

sudo grub-install /dev/nvme0n1p1

sudo grub-mkconfig -o /boot/grub/grub.cfg

reboot

Done that, the problem persists.

Installing for x86_64-efi platform.
Installation finished. No error reported.
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 not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done

Did you try setting the entry in /etc/default/grub and make sure the line is uncommented.

GRUB_DISABLE_OS_PROBER=false

Then run the update grub command

sudo grub-mkconfig -o /boot/grub/grub.cfg

2 Likes

Linux on an external drive cannot be used to automatically boot to Windows on any device you attach it and boot from, without manual/custom grub entries.
Of course, you may create a custom grub entry/function that might autodetect any windows bootloader no matter which device the external USB is attached to, but there is no automatic way (except if using supergrub as an addon).

Wishes, wishes… :grin:
The easy and trustworthy way is to boot Windows through the device UEFI Quick Boot Menu.
There is no difference in speed.

  • If you want to boot to windows, don’t attach (or remove) the Linux USB.
  • If you want to boot to Linux, attach the Linux USB.

If you want a Windows entry in grub menu for one device that you use more frequently, modify the entry for windows in /etc/grub.d/, setting the correct file path and UUID.

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