EFI system partition & GRUB bootloader

Hi all! Quick question about EFI system partition and GRUB bootloader.

My EFI system partition’s mount point is /boot/efi. I always install/reinstall my GRUB bootloader into /boot/efi/EFI/endeavouros-xxxx folder (with --bootloader-id= option). It contains my grubx64.efi file.

Example:
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --modules="luks2 part_gpt part_msdos cryptodisk gcry_rijndael argon2 pbkdf2 gcry_whirlpool btrfs" --bootloader-id=endeavouros-5986 --recheck

Bootloader ID reflects folder name under EFI directory where GRUB file is placed. Please note, that It is not the same thing as EFI directory.

I am sure that I am using GRUB image in exactly that folder (endeavouros-xxxx) to boot my system. Otherwise it just would not boot due to special configuration.

However, there is also /boot/efi/EFI/boot folder in present since EOS installation. It contains bootx64.efi file.

What is that file for? Is GRUB using it in any way? Should I keep it in my EFI partition or can I safely remove it?

EndeavourOS is my only system (no dual-boot), and my UEFI configuration has only endeavouros-xxxx boot option enabled. The files are different (sha512sum and by names).

I am asking that because I am learning how to set up Secure Boot and I don’t want to sign with my key bootloader if I am not even using it. Do note, however, that Secure Boot is not related to my question in any way, because I just reading about it, nothing more for now.

My question is: I want to know what for EOS installation uses folder boot and bootx64.efi file under EFI directory (not grubx64.efi file and endeavouros-xxxx folder). I understand, that most likely it is not distro-specific in any way, looks like it’s just something about GRUB bootloader that I don’t know yet.

Thank you in advance for your answers! :blue_heart:

difference between bootx64.efi and grubx64.efi ,
bootx64.efi can be last version boot EFI command , or boot on USB ,
grubx64.efi can only be on your disk boot for EOS

Thanks for asking the question!
It got me curios to do some searching and I always appreciate that.
Here is a post I found with an interesting and a bit more elaborate explanation:

Hope it helps!

And, welcome to the community @hotcapy!

:enos_flag: :handshake:t5:

3 Likes

Welcome to the forum @hotcapy :enos: :enos_flag: :partying_face:

1 Like

The practical use of this file depends on how many systems exist on the PC and on HW vendors UEFI implementation.

  • This is the default HW/firmware bootloader. Because vendors usually provide WinOS for their HW Operating System, this usually/normaly boots WinOS if it is installed.
  • Some UEFI firmware do not boot Linux, when WinOS is installed, even if UEFI boot order is set to Linux first. In these cases, we copy the grub efi file at this path (and filename), to bypass this problem.
  • Because all of the above, when creating an external bootable USB drive with Linux, we do the same as in previous case, using --removable grub parameter.

Archwiki includes all this info and more. :wink:

2 Likes

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