Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F140977099
D26428.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D26428.id.diff
View Options
Index: head/usr.sbin/bsdinstall/scripts/bootconfig
===================================================================
--- head/usr.sbin/bsdinstall/scripts/bootconfig
+++ head/usr.sbin/bsdinstall/scripts/bootconfig
@@ -124,6 +124,15 @@
done
fi
+ case $(uname -m) in
+ arm64) ARCHBOOTNAME=aa64 ;;
+ amd64) ARCHBOOTNAME=x64 ;;
+ # arm) ARCHBOOTNAME=arm ;; # No other support for arm install
+ # 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"
+
for esp in $ESPS; do
f_dprintf "Formatting /dev/${esp} as FAT32"
newfs_msdos -F 32 -c 1 -L EFISYS "/dev/$esp" > /dev/null 2>&1
@@ -141,6 +150,21 @@
f_dprintf "Installing loader.efi onto ESP"
mkdir -p "$mntpt/EFI/freebsd"
cp "$BSDINSTALL_CHROOT/boot/loader.efi" "${mntpt}/EFI/freebsd/loader.efi"
+
+ #
+ # The following shouldn't be necessary. UEFI defines a way to
+ # specifically select what to boot (which we do via
+ # efibootmgr). However, virtual environments often times lack
+ # support for the NV variables efibootmgr sets. In addition,
+ # some UEFI implementations have features that interfere with
+ # the setting of these variables. To combat that, we install the
+ # default removable media boot file as a fallback if it doesn't
+ # exist. We don't install it all the time since that can
+ # interfere with other installations on the drive (like rEFInd).
+ #
+ if [ ! -f "${mntpt}/${BOOTNAME}" ]; then
+ cp "$BSDINSTALL_CHROOT/boot/loader.efi" "${mntpt}/${BOOTNAME}"
+ fi
if [ "$num_esps" -gt 1 ]; then
bootlabel="FreeBSD (${esp})"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 31, 8:10 AM (4 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27406318
Default Alt Text
D26428.id.diff (1 KB)
Attached To
Mode
D26428: Initial support for implementing the bootXXX.efi workaround
Attached
Detach File
Event Timeline
Log In to Comment