Manual Page Search Parameters

LOADER.EFI(8) MidnightBSD System Manager's Manual LOADER.EFI(8)

loader.efiUEFI kernel loader

On UEFI systems, loader.efi loads the kernel.

boot1.efi(8) is used to load loader.efi when it is placed within the system.

/boot/loader.efi
The location of the UEFI kernel loader within the system.

loader.efi is installed on ESP (EFI System Partition) in one of the following locations:

efi/boot/bootXXX.efi
The default location for any EFI loader (see uefi(8) for values to replace ‘XXX’ with).
efi/freebsd/loader.efi
The location reserved specifically for the FreeBSD EFI loader.

The default location for the ESP mount point is documented in hier(7).

The following examples shows how to install a new loader.efi on ESP.

First, find the partition of type “efi”:

# gpart list | grep -Ew '(Name|efi)'
1. Name: nvd0p1
   type: efi
2. Name: nvd0p2
3. Name: nvd0p3
4. Name: nvd0p4
1. Name: nvd0

The name of ESP on this system is nvd0p1.

Second, let's mount ESP, copy loader.efi to the special location reserved for FreeBSD EFI loaders, and unmount once finished:

# mount_msdosfs /dev/nvd0p1 /boot/efi
# cp /boot/loader.efi /boot/efi/efi/freebsd/loader.efi
# umount /boot/efi

loader(8), uefi(8)

March 18, 2022 midnightbsd-3.1