From owner-dev-commits-src-all@freebsd.org Mon Feb 1 14:54:49 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 466D452CAD4; Mon, 1 Feb 2021 14:54:49 +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 4DTrZd1Yzpz3mgf; Mon, 1 Feb 2021 14:54:49 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 21E031D247; Mon, 1 Feb 2021 14:54:49 +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 111EsnJA070298; Mon, 1 Feb 2021 14:54:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 111EsnaN070297; Mon, 1 Feb 2021 14:54:49 GMT (envelope-from git) Date: Mon, 1 Feb 2021 14:54:49 GMT Message-Id: <202102011454.111EsnaN070297@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 14640ac7897b - stable/13 - bsdinstall: create /efi/boot directory in ESP MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 14640ac7897b79d49e97e5c571f05ae563f4a8e2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2021 14:54:49 -0000 The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=14640ac7897b79d49e97e5c571f05ae563f4a8e2 commit 14640ac7897b79d49e97e5c571f05ae563f4a8e2 Author: Mitchell Horne AuthorDate: 2021-01-15 16:14:27 +0000 Commit: Mitchell Horne CommitDate: 2021-02-01 14:53:21 +0000 bsdinstall: create /efi/boot directory in ESP If the installer is creating a new ESP, then this directory will not exist and the subsequent cp will fail silently. This is usually of no consequence if /efi/freebsd/loader.efi is set up correctly. Reviewed by: imp (cherry picked from commit 676b7d077c2c5f548334cea7fccfbfb5d097c9df) --- usr.sbin/bsdinstall/scripts/bootconfig | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/bootconfig b/usr.sbin/bsdinstall/scripts/bootconfig index 93a3bc0a53c2..1593545a1c2e 100755 --- a/usr.sbin/bsdinstall/scripts/bootconfig +++ b/usr.sbin/bsdinstall/scripts/bootconfig @@ -131,7 +131,10 @@ if [ "$(uname -m)" = "arm64" ] || [ "$X86_BOOTMETHOD" = "UEFI" ]; then # i386) ARCHBOOTNAME=ia32 ;; # no support for this in i386 kernels, rare machines *) die "Unsupported arch $(uname -m) for UEFI install" esac - BOOTNAME="/EFI/BOOT/BOOT${ARCHBOOTNAME}.EFI" + BOOTDIR="/efi/boot" + BOOTNAME="${BOOTDIR}/boot${ARCHBOOTNAME}.efi" + FREEBSD_BOOTDIR="/efi/freebsd" + FREEBSD_BOOTNAME="${FREEBSD_BOOTDIR}/loader.efi" for esp in $ESPS; do f_dprintf "Formatting /dev/${esp} as FAT32" @@ -148,8 +151,8 @@ if [ "$(uname -m)" = "arm64" ] || [ "$X86_BOOTMETHOD" = "UEFI" ]; then fi f_dprintf "Installing loader.efi onto ESP" - mkdir -p "$mntpt/EFI/freebsd" - cp "$BSDINSTALL_CHROOT/boot/loader.efi" "${mntpt}/EFI/freebsd/loader.efi" + mkdir -p "${mntpt}/${FREEBSD_BOOTDIR}" "${mntpt}/${BOOTDIR}" + cp "$BSDINSTALL_CHROOT/boot/loader.efi" "${mntpt}/${FREEBSD_BOOTNAME}" # # The following shouldn't be necessary. UEFI defines a way to @@ -173,7 +176,7 @@ if [ "$(uname -m)" = "arm64" ] || [ "$X86_BOOTMETHOD" = "UEFI" ]; then fi f_dprintf "Creating UEFI boot entry" - efibootmgr --create --activate --label "$bootlabel" --loader "${mntpt}/EFI/freebsd/loader.efi" > /dev/null + efibootmgr --create --activate --label "$bootlabel" --loader "${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null f_dprintf "Unmounting ESP" umount "${mntpt}"