Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Dec 2018 00:26:36 +0000 (UTC)
From:      Rebecca Cran <bcran@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r342638 - head/usr.sbin/bsdinstall/scripts
Message-ID:  <201812310026.wBV0QahE028646@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bcran
Date: Mon Dec 31 00:26:35 2018
New Revision: 342638
URL: https://svnweb.freebsd.org/changeset/base/342638

Log:
  Use the --activate efibootmgr(8) flag when creating entries in bootconfig
  
  Sponsored by:	Netflix

Modified:
  head/usr.sbin/bsdinstall/scripts/bootconfig

Modified: head/usr.sbin/bsdinstall/scripts/bootconfig
==============================================================================
--- head/usr.sbin/bsdinstall/scripts/bootconfig	Mon Dec 31 00:20:58 2018	(r342637)
+++ head/usr.sbin/bsdinstall/scripts/bootconfig	Mon Dec 31 00:26:35 2018	(r342638)
@@ -143,18 +143,12 @@ if [ "$(uname -m)" = "arm64" ] || [ "$X86_BOOTMETHOD" 
 		fi
 
 		echo "Creating UEFI boot entry"
-		efibootmgr --create --label "$bootlabel" --loader "${mntpt}/EFI/freebsd/loader.efi" > /dev/null
+		efibootmgr --create --activate --label "$bootlabel" --loader "${mntpt}/EFI/freebsd/loader.efi" > /dev/null
 
 		echo "Unmounting ESP"
 		umount "${mntpt}"
 		rmdir "${mntpt}"
 
-		# When creating new entries, efibootmgr doesn't mark them active, so we need to
-		# do so. It doesn't make it easy to find which entry it just added, so rely on
-		# the fact that it places the new entry first in BootOrder.
-		bootorder=$(efivar --name 8be4df61-93ca-11d2-aa0d-00e098032b8c-BootOrder --print --no-name --hex | head -1)
-		bootentry=$(echo "$bootorder" | cut -w -f 3)$(echo "$bootorder" | cut -w -f 2)
-		efibootmgr --activate "$bootentry" > /dev/null
 		echo "Finished configuring /dev/${esp} as ESP"
 	done
 fi



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