UEFI: How to go about updating the ESP with loader.efi during installworld

Allan Jude allanjude at freebsd.org
Sun Nov 4 21:25:32 UTC 2018


On 2018-11-04 16:20, Rebecca Cran wrote:
> I'm currently working on creating and updating the ESP (EFI System Partition) 
> for UEFI booting during installation and installworld. 
> 
> During installation, with my changes it gets mounted on /boot/efi and loader.efi 
> copied into /boot/efi/EFI/FreeBSD and /boot/efi/EFI/BOOT. An entry gets added to 
> /etc/fstab as noauto.
> 
> The issue comes during installworld, where we'll need to update the loader, 
> and I'm not sure how we should handle that. 
> If NO_ROOT isn't defined, do we just "mount /boot/efi", overwrite the files then 
> unmount it? What should we do if NO_ROOT _is_ defined?
> 

Previous to now, installworld has not updated the boot blocks. You've
had to manually run 'gpart bootcode' to change the boot blocks.

However, those boot blocks mostly just loaded /boot/loader, which was
updated by installworld.

So I can see how this is not directly analogous.

I wouldn't depend on the /etc/fstab entry existing. I am not sure I want
installworld randomly fobbing around in my EFI partition. Especially if,
for example, my EFI/BOOT is not FreeBSD, but rEFInd or something.

-- 
Allan Jude

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20181104/969b5b26/attachment.sig>


More information about the freebsd-current mailing list