Date: Wed, 27 Jan 2021 23:35:46 GMT From: Mitchell Horne <mhorne@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 676b7d077c2c - main - bsdinstall: create /efi/boot directory in ESP Message-ID: <202101272335.10RNZk38049622@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=676b7d077c2c5f548334cea7fccfbfb5d097c9df commit 676b7d077c2c5f548334cea7fccfbfb5d097c9df Author: Mitchell Horne <mhorne@FreeBSD.org> AuthorDate: 2021-01-15 16:14:27 +0000 Commit: Mitchell Horne <mhorne@FreeBSD.org> CommitDate: 2021-01-27 23:27:51 +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 MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D28176 --- 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}"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101272335.10RNZk38049622>