all of you who claim, that you have zero problems here… maybe for you the fallback option still works perfectly and you have no idea, that the actual main option doesn’t even exist half of the time? … just saying.
Exactly that! And if there is no reference the UEFI still has some mechanisms to detect bootable media. How well or sophiscated those mechanisms work is anyones guess, but one would assume, if the boot media has STANDARD solution (EFI/boot/bootx64.efi for example) is picks it up 99.9% of the time. If it has some semi-weird approach, which requires the boot installer generate boot files into the UEFI variables (I assume it’s in the /sys/firmware/efi/efivars/ folder) for anything to find it … it’s robustness is less reliable. Some manufacturers custom UEFI’s might just scan the $ESP for any *.efi files (Exactly like manjaro ISO “detect EFI bootloaders” does it), but it’s not a standard and doesn’t always work this well.
and the problem is, that Manjaro default installation relies on those entries there heavily, instead of going the standard single boot option.
At least that is how it looks to me.
Just looking my Ubuntu laptop efi folder. they also have BOOT + ubuntu actually… but their ubuntu folder has extra files in them, one of which is BOOTX64.CSV with content that points to shimx64.efi … and also some grub.cfg which helps to locate the correct disk?
AND in ubuntu, they have automatically copied the /efi/ubuntu/shimx64.efi to /BOOT/BOOTX64.EFI on the grub-install … they have identical date and time and md5sum. I think this is the main thing why Ubuntu doesn’t fail like Manjaro does.
No, EFI variables are stored in the firmware’s non-volatile memory, also referred to as the CMOS memory. They are not stored on disk.
/sys/firmware/efi/efivars/ is a virtual filesystem — its contents represent information about the hardware that the kernel exports to userspace in the form of directories and files.
/boot/efi/EFI/boot/bootx64.efi is not an EFI variable. It’s a 64-bit boot loader — usually GRUB, but it could be something else altogether — in the form of an EFI extension, so that the EFI firmware can load and execute it. This is the opposite of a legacy GRUB, which is just i8086 16-bit real-mode code.
I think you are mistaken in the second paragraph. Correct would be:
“/sys/firmware/efi/efivars/ is a virtual filesystem — that links to the motherboards NVRAM efi configuration folder or something”
nobody said, that it’s efi variable. I am saying, it’s standard file with standard location and name. https://uefi.org/specs/UEFI/2.10/03_Boot_Manager.html?highlight=bootx64%20efi
Whereas Manjaro/grubx64.efi definately is not standard (and therefore needs some pointer to it or uefi to have some kind of extra search functionality built in).
And the second paragraph from this quote is my problem with Manjaro, which obviously doesn’t do that, because it’s “undesirable” for couple of people… … I mean, it initially did on first install? But there is no mechanism or anything that will refresh or update this bootx64.efi when it gets updated for Manjaro/grub itself. I can only assume once again, that this bootx64.efi actually (if it was originally some grubx64.efi copy) that it has to actually match the executables and configurations and stuff in /boot/grub folder and when it doesn’t (I mean when the contents in grub folder gets updated to newer version on grub upgrade to newer version) and the bootx64.efi isn’t, then they don’t match and kinda breaks the system?
Is there some way or option somewhere to restore this grub-install functionality, that it will make this copy into BOOT/BOOTX64.EFI every time I update grub itself??
Doesn’t make a copy, just installs the grub to EFI/BOOT/BOOTX64.EFI instead of EFI/Manjaro/grubx64.efi. So I can just easily update it manually to the right location. (Or fix or upgrade also the “fallback option”)
Well, no. All information under /sys comes straight from the kernel, and the kernel in turn gets its information about the hardware and firmware from the UEFI, or — on legacy-booting systems — from the 16-bit real-mode code in the initramfs that accesses the firmware through legacy BIOS calls. But in the latter case, there are no efivars, of course.
Okay, let’s pick this apart.
First of all, you have /boot/efi/EFI/boot/bootx64.efi, and then there is /boot/efi/EFI/manjaro/grubx64.efi.
That latter one is the EFI executable that will be invoked if you directly choose “Manjaro” from the UEFI boot manager menu. The former one is whatever the default UEFI executable will be for that particular drive, and thus, the one that will be invoked if you select “UEFI OS” from the UEFI boot manager menu.
In other words, /boot/efi/EFI/boot/x64.efi could just as easily be the Microsoft Windows boot loader — and if you dual-boot with MS-Windows, then that’s what Microsoft will always make sure that it is.
Exactly, yes.
Yes, it did that on my system as well — I do have a /boot/efi/EFI/boot/bootx64.efi on my system.
And if you run install-grub — it’s a separate package from the repo, and not to be confused with grub-install — then Manjaro will make sure that this file exists upon every major update.
sudo pacman -Syu install-grub
Yes, that’s the manual way of doing the same thing.
Except it doesn’t… it still just upgrades EFI/Manjaro/grubx64.efi and not EFI/BOOT/BOOTX64.EFI. At least by default. And I can’t seem to find any documentation for this.
/boot/efi/EFI sudo install-grub 2 ✘
Grub will be installed on: EFI
Installing for x86_64-efi platform.
Installation finished. No error reported.
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-6.12-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-6.12-x86_64.img
Found initrd fallback image: /boot/initramfs-6.12-x86_64-fallback.img
Found linux image: /boot/vmlinuz-6.6-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-6.6-x86_64.img
Found initrd fallback image: /boot/initramfs-6.6-x86_64-fallback.img
Found linux image: /boot/vmlinuz-6.1-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-6.1-x86_64.img
Found initrd fallback image: /boot/initramfs-6.1-x86_64-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 ...
Found memtest86+ EFI image: /boot/memtest86+/memtest.efi
/usr/bin/grub-probe: warning: unknown device type nvme0n1.
done /boot/efi/EFI l Manjaro ✔
drwxr-xr-x - root 5 juuni 2019 .
drwxr-xr-x - root 7 jaan 17:23 ..
.rwxr-xr-x 139264 root 7 jaan 18:25 grubx64.efi <= reinstalled.
/boot/efi/EFI l BOOT ✔
drwxr-xr-x - root 7 jaan 17:22 .
drwxr-xr-x - root 7 jaan 17:23 ..
.rwxr-xr-x 139264 root 7 jaan 18:10 BOOTX64.EFI <= not-reinstalled. :-(
/boot/efi/EFI man install-grub ✔
No manual entry for install-grub
there is in the script variable fallback_is_same=false which should copy it, but even if I edit it to true, it still doesn’t work … so the script is broken?
not bash guru, but it seems it fails to find any fallback file. because it looks for lower case filename whereas the filename is in upper case normally (when installed with sudo grub-install --removable).
anyway fixed it myself.
Now where do I bugreport it?
Now it does work and replaces the file in EFI/BOOT also, may it be bootx64.efi or BOOTX64.EFI or BOOTx64.EFI or BoOtX.64.eFi
(in the grand scheme of things the filename case should not matter anyhow, because efi partition is in vfat, which usually is treated and mounted as case-insensitive as far as I know.)
Well, this topic has meandered along it’s merry way since the original Support request. I note that updating the BIOS as suggested has resolved the issues specified by the OP and that both kernel 6.6 (LTS) and kernel 6.12 appear to allow booting without issue:
The appropriate post has been marked as the Solution; and this topic is now closed. Feel free to continue the conversation in the Members area if you wish.