Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Mar 2021 02:01:29 GMT
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: e77cf2a4ab32 - main - Restore /boot/efi to mtree.
Message-ID:  <202103060201.12621TX9020363@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by nwhitehorn:

URL: https://cgit.FreeBSD.org/src/commit/?id=e77cf2a4ab32a381df3c06d25b8b4f650047c3f2

commit e77cf2a4ab32a381df3c06d25b8b4f650047c3f2
Author:     Nathan Whitehorn <nwhitehorn@FreeBSD.org>
AuthorDate: 2021-03-06 01:57:50 +0000
Commit:     Nathan Whitehorn <nwhitehorn@FreeBSD.org>
CommitDate: 2021-03-06 02:01:11 +0000

    Restore /boot/efi to mtree.
    
    Instead of whether /boot/efi exists, which it now always does, including
    on systems that don't and can't use EFI, use whether /boot/efi is
    present in fstab to signal to the installer that it is a valid ESP and
    should be configured. This has essentially the same semantics, but allows
    /boot/efi to be created unconditionally.
    
    Reviewed by:    bdragon, imp
    Tested by:      bdragon (ppc64)
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D29068
---
 etc/mtree/BSD.root.dist                | 2 ++
 usr.sbin/bsdinstall/scripts/bootconfig | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/etc/mtree/BSD.root.dist b/etc/mtree/BSD.root.dist
index 1dc9e179b0fc..f734f7891429 100644
--- a/etc/mtree/BSD.root.dist
+++ b/etc/mtree/BSD.root.dist
@@ -18,6 +18,8 @@
             rockchip              tags=package=runtime
             ..
         ..
+        efi
+        ..
         firmware
         ..
         loader.conf.d             tags=package=bootloader
diff --git a/usr.sbin/bsdinstall/scripts/bootconfig b/usr.sbin/bsdinstall/scripts/bootconfig
index 088d88ca9b2f..a592142d87a2 100755
--- a/usr.sbin/bsdinstall/scripts/bootconfig
+++ b/usr.sbin/bsdinstall/scripts/bootconfig
@@ -47,7 +47,7 @@ if [ `uname -m` == powerpc ]; then
 fi
 
 # Update the ESP (EFI System Partition) with the new bootloader if we have an ESP
-if [ -d "$BSDINSTALL_CHROOT/boot/efi" ]; then
+if [ -n "$(awk '{if ($2=="/boot/efi") printf("%s\n",$1);}' $PATH_FSTAB)" ]; then
 	case $(uname -m) in
 	    arm64)	ARCHBOOTNAME=aa64 ;;
 	    amd64)	ARCHBOOTNAME=x64 ;;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103060201.12621TX9020363>