From nobody Mon Apr 04 17:50:45 2022 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D38421A8C914; Mon, 4 Apr 2022 17:50:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KXJGY5ZBWz3Jd6; Mon, 4 Apr 2022 17:50:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649094645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9hMNDSRMfNA6i1A5a0Keo56UybSTXcYzGFtGWjOon+4=; b=ukpN0jPaHJkMa4weTDULieGYDAussHIZNF1n9QQ/OAtFxtfETi5GWw+SeMkMjTr8ZALXfD FodOvSlgKgADBuAT8mRvBDBG77MajoXPbmDqdAZ4oTXJxLeA8CcvM9atb+0+nX/rGu7aQU DS3O65s5I802wKyVQ1l3eICUp+XiUkW9Kbzts7fBSMUcKcZvk1SZA2uQUBMAL9EKwV7gSp gID/Sg3NpqTG7Cn/lnp7rkpR4o1QQcKHrrffpICpWLRvUVsnac9Eox9mhcUYrXPlpjdozr 08zd5LI01MRLF5qdLiBHBlN9ZwRFTl7/70fP8mDkM4Jq8QPcumOklXhfGzJ7OQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9F09916471; Mon, 4 Apr 2022 17:50:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 234HojxB038557; Mon, 4 Apr 2022 17:50:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 234Hoj7x038556; Mon, 4 Apr 2022 17:50:45 GMT (envelope-from git) Date: Mon, 4 Apr 2022 17:50:45 GMT Message-Id: <202204041750.234Hoj7x038556@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 1df2b7c9549e - stable/13 - loader.efi: Improve the manual page List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1df2b7c9549eb8d15ae6750f3b88fc667dae5735 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649094645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9hMNDSRMfNA6i1A5a0Keo56UybSTXcYzGFtGWjOon+4=; b=q0uV78f4jl9QDwicRFnDyTWLnCTVvSZwcAImOvMm95FFmWIgzKeMkhnmtXWkOaTZ0GlNRT vsgvAMABVD+9WAR4Bk3/VptXEVY9qLx0mM2AZQQtZ/LL/XpVf9xR4gq1RvH0xuoypiiSaK 5vVyk1mJmK5hn/4m3SKnboUgGa/Lojm2bUpjOXRCtMTw3xWhqxO8Fehh9rbi4S0TJHjn2D D7ZgNXIRbdi0iO3aIjh//NYu9Z2atrvpLD9W8c1JRLwbYYeM1mxIJp/OEsK1VcgemcQB8x 8MqV+pTzTVjWkqHsS6zOlCqdNK3zrn9bL4+wfa51CtbmXFwSogJizDLfKfAr/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649094645; a=rsa-sha256; cv=none; b=qwowfI4zkQThgBN+PGzQaVMaAXvNt8vy5VsLr0hwhnQt121+KgE7snw3EyZMKdA3jAZ+43 4oBnfjTbP5BYggg0OMSv9gZfYkRQrlbVeAjHqyA/lsDuapOqzIwuCEYjXFXEVpwVRKTW3F D4nx1ReTrP70XLsyknHh0uVPXVDi0gqC7vuz4ZlnibF2myabPHgCdzLW7VyjbZhqOmqVw6 uR7iS3mIVATY9Knewf3mo8D2LWjEIh1PCfkqDnuMgs+vgAkym6bH49ln+GDxdJIynhlGHV R60x1AoTENepa8m36UthNRah3YdZaNCYv7/OTYNz0BCVtJ7g90v0vDjz4JVAzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=1df2b7c9549eb8d15ae6750f3b88fc667dae5735 commit 1df2b7c9549eb8d15ae6750f3b88fc667dae5735 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-03-18 08:54:23 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2022-04-04 17:49:55 +0000 loader.efi: Improve the manual page - Add SPDX tag - Add a files section describing different locations related to the loader - 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: https://reviews.freebsd.org/D34592 (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 <0mp@FreeBSD.org> .\" .\" 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 .Dt LOADER.EFI 8 .Os .Sh NAME @@ -34,17 +37,65 @@ On UEFI systems, .Nm 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 -.Fx -reserved area as -.Pa /efi/freebsd/loader.efi -within the ESP , -or within the system as -.Pa /boot/loader.efi . +.Pp .Xr boot1.efi 8 is used to load .Nm when it is placed within the system. +.Sh FILES +.Bl -tag -width "/boot/loader.efi" +.It Pa /boot/loader.efi +The location of the UEFI kernel loader within the system. +.El +.Ss EFI System Partition +.Nm +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 +with +.Pc . +.It Pa efi/freebsd/loader.efi +The location reserved specifically for the +.Fx +EFI loader. +.El +.Pp +The default location for the ESP mount point is documented in +.Xr hier 7 . +.Sh EXAMPLES +.Ss Updating loader.efi on ESP +The following examples shows how to install a new +.Nm +on ESP. +.Pp +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 +.Ed +.Pp +The name of ESP on this system is +.Pa nvd0p1 . +.Pp +Second, let's mount ESP, copy +.Nm +to the special location reserved for +.Fx +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 +.Sh SEE ALSO +.Xr uefi 8