Page MenuHomeFreeBSD

bsdinstall: create /EFI/BOOT directory in ESP
ClosedPublic

Authored by mhorne on Jan 15 2021, 4:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 8 2024, 1:59 PM
Unknown Object (File)
Sep 28 2024, 5:35 AM
Unknown Object (File)
Sep 24 2024, 6:34 PM
Unknown Object (File)
Sep 15 2024, 10:06 PM
Unknown Object (File)
Sep 6 2024, 2:59 AM
Unknown Object (File)
Sep 5 2024, 12:26 PM
Unknown Object (File)
Sep 5 2024, 3:52 AM
Unknown Object (File)
Sep 2 2024, 8:12 AM
Subscribers
None

Details

Summary

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.

Test Plan

bsdinstall to a blank disk, verify that /EFI/BOOT/BOOT${arch}.EFI is present on the ESP.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 36226
Build 33115: arc lint + arc unit

Event Timeline

mhorne created this revision.

Ping. Any objection to this patch?

The dirname got me thinking and that lead to these larger suggestions, as well as moving it earlier.

usr.sbin/bsdinstall/scripts/bootconfig
134

BOOTDIR="/efi/boot"
BOOTNAME="${BOOTDIR}/boot${ARCHBOOTNAME}.efi
FREEBSD_BOOTDIR="/efi/freebsd"

151

mkdir -p "${mntpt}/${FREEBSD_BOOTDIR}" "${mntpt}/${BOOTDIR}"

152

"${mntpt}/${FREEBSD_BOOTDIR}/loader.efi

166

This is too late. I'd suggest above.

usr.sbin/bsdinstall/scripts/bootconfig
166

Yep, that is much better. Will update shortly.

Incorporate imp's suggestions.

One further simplification, use $FREEBSD_BOOTNAME instead of $FREEBSD_BOOTDIR/loader.efi.

This revision is now accepted and ready to land.Jan 27 2021, 10:41 PM