From nobody Sat Apr 25 15:13:00 2026 X-Original-To: dev-commits-src-main@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 4g2tch0Bc5z6bftV for ; Sat, 25 Apr 2026 15:13:08 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2tcg3829z3ncF for ; Sat, 25 Apr 2026 15:13:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777129987; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TyyByw5c/e04qLh3BYYma6xDS+JCXCrQ21kmvsdCOeE=; b=fyn7VlCHqyeljMDZ+EgaKpWHREPB3LDBM4ql9R0vgOwgeIHYFe2A9bqJth2765hNBpXo0O jwb0LDySy+ZkWsFp/a+tSQMRdnhIErzXjQzaWSHXt9THLVVrWeqNl0KaWE/guueA0XYOVS 4bkhJX3RWD6TZMruwNUHgTniZ+xm7CHfhbd5nQW9c5/hFAfBkjaAh7Nf7A6Iy9EEjTZnIr hTTXp1dTssnCxSJRnR77FQqmMwbflRsccU9w7oy6n5DIfo4r2FT/b9tKK6blWrEjV4qVRN fYElCrrQM6V20RAnZQbt757KnkUFFHp/PPYVIJ1YjwO2vE3+rAKad3VTjBBHqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777129987; a=rsa-sha256; cv=none; b=RzNdFXg7W593OzHQCJ7AA13GAeHSjuW/8yIVRju7+CmGn8wSiaool9oHSLUgLX5XRp4tMk vNukULbK/e04ihpKD+oIuRVkeuzvjonB+i8lw6RXDUqJiBHrN3BonkLxfrZ36pi7VJMxZL rFftAcXuTKY/A6b9yen8NSBPzUGHyC+9vhvBehNJVQ6HzwFbLoDBitEUpZmZvvqzEZWJoL uigARUc4ij65pBgVP55wlGw1zsXCBoioTY5aqskO3M8qqPfBrUZdSK+6QXa1ojOv+I3Vi0 Wsd6lFmjuHcSsgkwqnnr6dLb1sYhzu/DdG9Ivb+Hf5K3fnS0DF7dzDoXUeniCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777129987; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TyyByw5c/e04qLh3BYYma6xDS+JCXCrQ21kmvsdCOeE=; b=sCCLwQGf8jVFuCv0JN+jVIFvvK7DohCLa6Jfi+RzVqrIUkifVgAQcszpmQdDGEKsG+XB/1 z/HRcF28V+vG/x/UpGMK9APVXf0woGovkDkKLB1akxqUuHA/SzBr4A+02mRRTzU5JOx5YQ kursKj4ittdO3lSuawBhCuDYLm03YDy0rrqplTeN3mIlSQ2Kd0YGYfh1HpxLdy/LfTYIAy iZ2wz1p+i2B1tBJs8epUZjrtxUOxe45aADo7wO3O+RBvg49VgF6taDQmBwdn0jBxEUvann ONrX1YfKg1cmtZbRQ4HZCyZNwIRXqQj854JaRyNfED6Xkg/kS546VZNDhfZA/A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2tcf1mx3zfYX for ; Sat, 25 Apr 2026 15:13:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d794 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 15:13:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Paarth Shirsat From: Benedict Reuschling Subject: git: 4137c673fa96 - main - loader.efi(8): Document LoaderEnv and NextLoaderEnv EFI variables List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bcr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4137c673fa963fdf409eba2f48d615350c988ffe Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 15:13:00 +0000 Message-Id: <69ecd9fc.3d794.3a700bb9@gitrepo.freebsd.org> The branch main has been updated by bcr: URL: https://cgit.FreeBSD.org/src/commit/?id=4137c673fa963fdf409eba2f48d615350c988ffe commit 4137c673fa963fdf409eba2f48d615350c988ffe Author: Paarth Shirsat AuthorDate: 2026-04-25 15:10:27 +0000 Commit: Benedict Reuschling CommitDate: 2026-04-25 15:12:04 +0000 loader.efi(8): Document LoaderEnv and NextLoaderEnv EFI variables Describe how the LoaderEnv and NextLoaderEnv variables can be used. PR: 293054 Reviewed by: imp Sponsored by: Wiesbaden Hackathon 202604 Differential Revision: https://reviews.freebsd.org/D56633 --- stand/man/loader.efi.8 | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/stand/man/loader.efi.8 b/stand/man/loader.efi.8 index 8bb88dd2e24f..32729ff519a2 100644 --- a/stand/man/loader.efi.8 +++ b/stand/man/loader.efi.8 @@ -217,14 +217,47 @@ functionality where we use the video console if a keyboard is connected and a serial console otherwise. .Ss Additional Environment Variables .Nm -loads some extra variables early in startup from -.Pa /efi/freebsd/loader.env -from the EFI partition. -Only simple variables can be set here. +can set variables early in startup from a file on the EFI partition. +By default, that file is +.Pa /efi/freebsd/loader.env . +It can be changed by setting the FreeBSD EFI variable +.Va LoaderEnv , +as in: +.Bd -literal -offset indent +echo -n /efi/freebsd/alt.env | efivar -w -t 7 \\ + -n cfee69ad-a0de-47a9-93a8-f63106f8ae99-LoaderEnv +.Ed +.Pp +After that is executed, the file +.Pa /efi/freebsd/alt.env +is used instead of +.Pa /efi/freebsd/loader.env . +See +.Xr efivar 8 +for more information on setting EFI variables. +.Pp +The EFI variable +.Va NextLoaderEnv +can be set to the pathname of a second startup file. +That variable is deleted immediately after its value is retrieved, +so setting it will affect only the next boot attempt. +For either variable, a missing file is silently ignored. +.Pp +Only simple variables can be set in the startup file. It can be useful to specify the root filesystem: .Bd -literal -offset indent rootdev=disk0s1a .Ed +.Pp +The startup file contains a series of assignments separated by spaces, +tabs, or newlines. +Quotes are not given any special treatment. +If no +.Li =value +is given, the value +.Li 1 +is used. +Invalid syntax and the like are silently ignored. .Ss Staging Slop The kernel must parse the firmware memory map tables to know what memory it can use.