Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The boot behavior for GRUB's multiple EFI executable files

Tags:

ubuntu

uefi

grub2

After installing Ubuntu, there are several *.efi files inside /efi/UBUNTU/ of EFI system partition:

  • GRUBX64.EFI
  • MOKMANAG.EFI
  • SHIMX64.EFI
  • mmx64.efi
  • fwupx64.efi

But UEFI Specification 2.7 says in the section "13.3.1.3 Directory Structure":

There must also only be one executable EFI image for each supported processor architecture in each vendor subdirectory. This guarantees that there is only one image that can be loaded from a vendor subdirectory by the EFI Boot Manager. If more than one executable EFI image is present, then the boot behavior for the system will not be deterministic.

I would make clear the boot behavior of GRUB's 5 EFI executable files.

like image 804
Intron BBS Avatar asked Feb 17 '26 04:02

Intron BBS


1 Answers

The UEFI firmware will normally look into the /boot/efi/EFI/BOOT/ folder for the appropriate EFI executable. The name of the executable it looks for depends on the architecture of your system. For a x86_64 architecture, the file is BOOTX64.EFI

This file is actually a copy of one of the EFI executables that lie in the /boot/efi/EFI/ubuntu/ folder. In my case /boot/efi/EFI/BOOT/BOOTX64.EFI is a copy of /boot/efi/EFI/ubuntu/shimx64.efi.

See UEFI boot: how does that actually work, then? and The EFI System Partition and the Default Boot Behavior for a more detailed explanation.

To understand why there are all these other EFI executables in /boot/efi/EFI/ubuntu/, see SecureBoot on the ubuntu wiki.

like image 120
The Quark Avatar answered Feb 19 '26 20:02

The Quark



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!