Page MenuHomeFreeBSD

bsdinstall: create /EFI/BOOT directory in ESP
ClosedPublic

Authored by mhorne on Jan 15 2021, 4:18 PM.
Tags
None
Referenced Files
F80193110: D28176.diff
Fri, Mar 29, 1:35 AM
Unknown Object (File)
Feb 26 2024, 12:17 PM
Unknown Object (File)
Feb 1 2024, 5:07 AM
Unknown Object (File)
Jan 23 2024, 10:25 AM
Unknown Object (File)
Dec 20 2023, 5:04 PM
Unknown Object (File)
Dec 20 2023, 5:26 AM
Unknown Object (File)
Dec 14 2023, 4:23 PM
Unknown Object (File)
Nov 12 2023, 9:58 PM
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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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–137

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

153–154

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

154–155

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

169

This is too late. I'd suggest above.

usr.sbin/bsdinstall/scripts/bootconfig
169

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