From nobody Mon Dec 18 17:10:36 2023 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 4Sv5th5391z54lcc; Mon, 18 Dec 2023 17:10:36 +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 4Sv5th3xd2z3HyY; Mon, 18 Dec 2023 17:10:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702919436; 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=GrMHpOc5AD9m/EVrTYW5M/xwZ6JT7E5iVrfR709dAVE=; b=waUVpzZ7hWKUCxJMG9M9hN4rp8nhn5x2PS8Yo5du5p4RvxUZDqOY4XLT/fyAvppozvaTOD Ui26Ya5kw8gamc8e94gZlwU0YVZNaH43SKYFflS3vF3kJiQT4GziKKmI4e9gSRk8k3mhPt 1XOUN8EoAWfiaYDUXLlNGcvbO78s3QT2x44mvvrmTMHgq/ypXjJ1TIFR/lQIrMcuekqtXi uhDaUWqWbgCkU0t951g2uwn/0XoxjKNxGZ1gLnSpAV/W6di4/F3pBOGE/4pLPqdW0hvzJj Rb4sAylRuN0kmC/nDrh/zYFwWBJTs84W+1YtphNUpZG5AMVgR6tBVh0Ny3xcnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702919436; a=rsa-sha256; cv=none; b=XtobnZm22LJJOE29oS7lb0kk7Q1QUbilHxS3yAMI1vAJ3aN3y4ESxe+gCjm+sC7axfTpHe qLIpUh3Y4KYEE32oge2l1+/fxPv9671RowWYCPo4pRBoQkMubqg01xyKqXc/NVnPgYnZRn i8xJhjCIW6NeNkpcKEr4YJrxjiFY2b8Sb4qjgo3nrDcFw28DfrnvgicbUtTaaTqVXHaY/L B8NarGlTx7hPeodDulfiIi23Og5z154T19BqS+Tohqzk1aXql8y7qPNiFVqpL5hKe1SKCL Kdho4TQd0QM5RIq8U3UzCQhm33S8uHxIt0bO9c+Ujppud7SWsZnFJ4RsdpHTxw== 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=1702919436; 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=GrMHpOc5AD9m/EVrTYW5M/xwZ6JT7E5iVrfR709dAVE=; b=Kj1SHPAyb67NuRw/blqLXEa8xtlFC5zWNdm29rpY3XQzZncj52Y1KIxgeRYWUfpPJEn30h 8L35DD3MI1dWqDK7xdpbd/G1yeTN4v5y/QfgDN/c37QrsH1ISvyUTQkhBWMg66dXnPd7ce c5T7v1AmSeiQhetRsN9VXIwYR2r+ve6S/okwNi/9pgDBimpEfYT32ZgA4CqtaY/9s4sydd JA04QIDdPTcU9/c2iiycIR83P0tC4p8vh+KeUV6ozbtLQSfhxpb23+zMn+xn6cs1708HBC PsqNcfqloyRNC9Ebt4WIzCRjM4w73ooUtqvMP+qj3GCCCrC6qi/z98NhdA2AtQ== 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 4Sv5th2nMqzTcr; Mon, 18 Dec 2023 17:10:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BIHAaQ0081381; Mon, 18 Dec 2023 17:10:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BIHAaQs081378; Mon, 18 Dec 2023 17:10:36 GMT (envelope-from git) Date: Mon, 18 Dec 2023 17:10:36 GMT Message-Id: <202312181710.3BIHAaQs081378@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 6aa1b4332f6c - main - efibootmgr: Document -e command line switch 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6aa1b4332f6c0b1d97599996beab32e45d0d0de4 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6aa1b4332f6c0b1d97599996beab32e45d0d0de4 commit 6aa1b4332f6c0b1d97599996beab32e45d0d0de4 Author: Warner Losh AuthorDate: 2023-12-18 04:32:15 +0000 Commit: Warner Losh CommitDate: 2023-12-18 17:01:38 +0000 efibootmgr: Document -e command line switch -e env will include `env` in the boot loader. Document that the boot loader appends the `env` to the BootXXXX variable, and will parse it as a series of a=b values to set in the boot loader's environment. These assignments are separated by spaces. The env arg needs to be quoted if more than one env var is to be set (we parse only the next argument on the command line). Sponsored by: Netflix --- usr.sbin/efibootmgr/efibootmgr.8 | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/usr.sbin/efibootmgr/efibootmgr.8 b/usr.sbin/efibootmgr/efibootmgr.8 index 5805b797ff5c..f74ee8a2e634 100644 --- a/usr.sbin/efibootmgr/efibootmgr.8 +++ b/usr.sbin/efibootmgr/efibootmgr.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 26, 2023 +.Dd December 17, 2023 .Dt EFIBOOTMGR 8 .Os .Sh NAME @@ -130,6 +130,21 @@ Create a new variable (aka method or entry). .It Fl D -dry-run Process but do not change any variables. +.It Fl e -env +When creating a +.Cm Boot +variable, include a set of environment variables for the loader to set after +parsing the command line. +Variables are of the form +.Dq a=b +and separated by spaces. +The argument should be quoted. +.Nm appends these to the end of the +.Cm Boot +environment variable. +Before processing anything else, +.Xr loader.efi 8 +will parse this area and set all variables found there. .It Fl E -esp Print the .Fx @@ -216,16 +231,16 @@ the EFI partition mounted under .Pa /boot/efi , mark the method active, using the given loader and label the method -.Qq FreeBSD-11 : +.Qq FreeBSD-15 : .Pp -.Dl efibootmgr -a -c -l /boot/efi/EFI/freebsd/loader.efi -L FreeBSD-11 +.Dl efibootmgr -a -c -l /boot/efi/EFI/freebsd/loader.efi -L FreeBSD-15 .Pp This will result in the next available bootnum being assigned to a new UEFI boot variable, and given the label -.Qq FreeBSD-11 +.Qq FreeBSD-15 such as: .Pp -.Dl Boot0009 FreeBSD-11 +.Dl Boot0009 FreeBSD-15 .Pp Note newly created boot entries are, by default, created inactive, hence the reason