Failed to open grubx64.efi - Not Found
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- linux
- Domain
- operating-systems
Research direction
Reproduce the reported case in a qemu-kvm VM without NVRAM boot records, using the shown GRUB menu and the paths bootx64.efi and fbx64.efi. Compare chainloading bootx64.efi through GRUB with launching it from UEFI, then determine why the former reports Not Found and document or correct the behavior.
Written by the indexing model from the issue text.
Description
This feels somewhat related to #307, in that some other boot loader is running that is directed to run the shim.
https://askubuntu.com/questions/906776/error-failed-to-open-efi-boot-grubx64-efi-dual-booting
Is another example.
So, given a qemu-kvm virtual machine with no NVRAM boot records (a system restored from backups, in my case), I have a recovery disk with a grub menu that does the following.
if [ x"${grub_platform}" = xefi ]; then
for bootfile in (*)/efi/boot/bootx64.efi; do
if regexp "$osdisk" $bootfile; then
regexp --set=1:thispart "([^/]*)/.*" $bootfile
menuentry "Boot OS on ${thispart}" {
chainloader ${bootfile}
}
break
fi
done
...
In the case of an Ubuntu 20.04 Qemu-kvm machine with my recovery disk as hd0, and the system disk as hd1, I get bootfile=(hd1,gpt2)/efi/boot/bootx64.efi. When choosing that menu option (or as in the image below, chainlodering it by hand), I get a Not Found error.

I find that if I set bootfile=(hd1,gpt2)/efi/boot/fbx64.efi, the system boots correctly (adds the record from boot.csv and everything).
However, I can boot from that bootx64.efi file in three ways, and it successfully executes fbx64.efi.
- Remove my recovery disk (UEFI picks the file by default)
- Use grub to run
fwsetup, and use the Tianocore UEFI menu to boot directly from the file - Run the "Internal EFI Shell", and execute bootx64.efi from there.
I can't tell if this is grub's fault for corrupting the environment, or if this is shim's fault for not knowing that it should be finding fbx64.efi. I'd love to learn more.
For now, I've slightly modified my grub config to include fbx64.efi:
if [ x"${grub_platform}" = xefi ]; then
for file in /EFI/BOOT/GRUBX64.EFI /EFI/BOOT/FBX64.EFI /EFI/BOOT/BOOTX64.EFI; do
search --no-floppy --file --hint=${osdisk}, --set=thispart ${file}
if regexp "$osdisk" $thispart; then
menuentry "Boot OS (${thispart})${file}" {
chainloader (${thispart})${file}
}
break
fi
done
else
...
And that gets me unblocked. But I would be happier with something simpler like "Just chainload the bootx64.efi program."
- Dominant language
- C
- Stars
- 1.1k
- Forks
- 348
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rhboot/shim
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Similar issues
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·
-
bug Self Built Image SNAPSHOT Supported Device target/ramips
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100