git: e92ad24da5a7 - stable/12 - loader.efi: Improve the manual page

From: Mateusz Piotrowski <>
Date: Mon, 04 Apr 2022 17:51:42 UTC
The branch stable/12 has been updated by 0mp (doc, ports committer):


commit e92ad24da5a7ea4cb1f74f5b11ffc004345f9b8a
Author:     Mateusz Piotrowski <>
AuthorDate: 2022-03-18 08:54:23 +0000
Commit:     Mateusz Piotrowski <>
CommitDate: 2022-04-04 17:50:10 +0000

    loader.efi: Improve the manual page
    - Add SPDX tag
    - Add a files section describing different locations related to the
    - Add an example explaining how to install a new loader.efi to ESP
    - Reference uefi(8)
    Reviewed by:    tsoome
    Reviewed by:    Pau Amma <>
    Reviewed by:    Jose Luis Duran <>
    MFC after:      2 weeks
    Differential Revision:
    (cherry picked from commit 9ecf6e0f9f257279bb3a7762bc26efb72471c6ea)
 stand/man/loader.efi.8 | 73 ++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 62 insertions(+), 11 deletions(-)

diff --git a/stand/man/loader.efi.8 b/stand/man/loader.efi.8
index 960264364c3d..2a19271017fa 100644
--- a/stand/man/loader.efi.8
+++ b/stand/man/loader.efi.8
@@ -1,5 +1,8 @@
+.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD
 .\" Copyright (c) 2019 Netflix, Inc
+.\" Copyright (c) 2022 Mateusz Piotrowski <>
 .\" Redistribution and use in source and binary forms, with or without
 .\" modification, are permitted provided that the following conditions
@@ -24,7 +27,7 @@
 .\" $FreeBSD$
-.Dd September 1, 2020
+.Dd March 18, 2022
@@ -34,17 +37,65 @@
 On UEFI systems,
 loads the kernel.
-It is installed into the ESP (EFI System Partition), either in the
-default location of
-.Pa /efi/boot/bootXXX.efi
-within the ESP, in the
-reserved area as
-.Pa /efi/freebsd/loader.efi
-within the ESP ,
-or within the system as
-.Pa /boot/loader.efi .
 .Xr boot1.efi 8
 is used to load
 when it is placed within the system.
+.Bl -tag -width "/boot/loader.efi"
+.It Pa /boot/loader.efi
+The location of the UEFI kernel loader within the system.
+.Ss EFI System Partition
+is installed on ESP (EFI System Partition) in one of the following locations:
+.Bl -tag -width "efi/freebsd/loader.efi"
+.It Pa efi/boot/bootXXX.efi
+The default location for any EFI loader
+.Po see
+.Xr uefi 8
+for values to replace
+.Ql XXX
+.Pc .
+.It Pa efi/freebsd/loader.efi
+The location reserved specifically for the
+EFI loader.
+The default location for the ESP mount point is documented in
+.Xr hier 7 .
+.Ss Updating loader.efi on ESP
+The following examples shows how to install a new
+on ESP.
+First, find the partition of type
+.Dq efi :
+.Bd -literal -offset indent
+# 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
+.Pa nvd0p1 .
+Second, let's mount ESP, copy
+to the special location reserved for
+EFI loaders, and unmount once finished:
+.Bd -literal -offset indent
+# mount_msdosfs /dev/nvd0p1 /boot/efi
+# cp /boot/loader.efi /boot/efi/efi/freebsd/loader.efi
+# umount /boot/efi
+.Xr uefi 8