The standard file name for the EFI boot selection on an x64 (64-bit) system is \EFI\BOOT\BOOTX64.EFI. This file is often referred to as the "fallback bootloader" because the UEFI firmware is designed to look for it in this specific location on removable media like USB drives, as well as on fixed disks if no other boot entries are defined. For 32-bit x86 systems, the equivalent file is \EFI\BOOT\BOOTIA32.EFI.
The UEFI boot process explained
To understand the role of BOOTX64.EFI, it's important to know how the UEFI boot process differs from the legacy BIOS.
EFI System Partition (ESP)
In a modern, UEFI-based system, the boot files are stored on a dedicated EFI System Partition (ESP).
- The ESP is a small, FAT32-formatted partition on the storage device (SSD or HDD).
- Unlike the Master Boot Record (MBR) used by legacy BIOS, the ESP contains files that are run by the UEFI firmware.
The UEFI boot manager
The UEFI firmware on a motherboard includes a built-in boot manager that scans the ESP for available boot loaders. The firmware also maintains a list of installed operating systems and their bootloader paths in a special non-volatile RAM (NVRAM) memory.
- The UEFI boot manager uses the NVRAM to present the user with a boot menu, which typically shows human-readable entries like "Windows Boot Manager" or "ubuntu".
- These entries correspond to specific
.efifiles located within the vendor-specific subdirectories of the\EFI\folder on the ESP.
The fallback bootloader
While the NVRAM entries are used for permanently installed operating systems, the fallback bootloader is crucial for other scenarios.
- Removable media: When booting from a USB drive or a CD/DVD, the UEFI firmware will look for
\EFI\BOOT\BOOTX64.EFIas the default boot entry. - Missing NVRAM entry: If the NVRAM boot entry for a specific operating system is missing or corrupted, the UEFI may fall back to checking the standard
\EFI\BOOT\BOOTX64.EFIpath. This is a common way to manually boot into an operating system if the standard boot process is failing.
Examples of EFI boot file paths
While BOOTX64.EFI is the standardized fallback, most operating systems use their own specific paths for their primary bootloaders.
Windows
- Windows Boot Manager file: The main bootloader file for a permanent Windows installation is
\EFI\Microsoft\Boot\Bootmgfw.efi. - Fallback file: A copy of the Windows Boot Manager is often placed in the fallback location at
\EFI\BOOT\BOOTX64.EFIto ensure it can be found.
Linux
- GRUB2: For a Linux distribution like Ubuntu, the bootloader is typically GRUB2. The EFI file for a standard installation is located at
\EFI\ubuntu\grubx64.efi. - Secure Boot: If Secure Boot is enabled, a shim file is used. The shim is the first program loaded by the UEFI and is verified against trusted keys. It then loads the GRUB bootloader. The Secure Boot file path for Ubuntu is often
\EFI\ubuntu\shimx64.efi. The shim bootloader then looks forgrubx64.efiin the same directory. - Fallback file: Many Linux installers, like Fedora, also place a copy of their bootloader or shim into the
\EFI\BOOT\BOOTX64.EFIfallback path.
Manual boot selection and recovery
Understanding these file paths is critical for troubleshooting boot issues or for managing multiple operating systems (dual-booting).
- Firmware setup: Most UEFI firmware offers a "Boot from file" option in the setup menu. This allows you to manually browse the ESP and select a specific
.efifile to launch. - Fixing bootloaders: If an operating system becomes unbootable due to a corrupted boot entry, you can often use a recovery environment (like a Windows installer USB or a Linux Live USB) to access the ESP and repair the bootloader. Commands like
bcdbootfor Windows orgrub-installfor Linux can be used for this purpose. - Customizing boot order: In the firmware settings, you can reorder the boot entries in the NVRAM to change which operating system is launched by default. You can also use a tool like
efibootmgrin Linux to manage the NVRAM entries.