Re: Review D58990: freebsd-update: automatically update EFI and BIOS bootloaders on install

Tomoaki AOKI <[email protected]>
Newsgroups gmane.os.freebsd.devel.hackers
Organization Junchoon corps
Message-ID <[email protected]>
On Thu, 20 Aug 2026 00:57:19 -0700
"Ronald Pagani Jr (ronald.pagani.jr)" <[email protected]>
wrote:

> On Wed, Aug 19, 2026 at 10:42 PM Marco Moock <[email protected]> wrote:
> 
> > Am 19.08.26 um 18:30 schrieb Ronald Pagani Jr (ronald.pagani.jr):
> > > The problem: freebsd-update updates /boot/loader.efi on the root
> > > filesystem,
> >
> > Why is that located there if it is redundant on the ESP?
> > Chainloading?
> >
> 
> As I understand it, `/boot/loader.efi' is the location where the .efi
> update is written.  We need some mechanism for that .efi to land it in ESP.

A bit of details.

On installworld that actually build loader.efi on compile-time
directory, there are no generic and safe way to determine where is
the actual ESP (in which drive, in which partition number, how large
is it) at the target computer all over the world that can UEFI-boot.

And UEFI firmware cannot load boot codes (i.e. for FreeBSD, bootx64.ef1,
loader.efi, boot1.efi and gptboot.efi are possible for UEFI boots)
outside of ESP.

This is because these are installed into /boot/ and packaged for
pkgbase, freebsd-update and installer images. Unavoidable redundancy
to be generic.


> > > but the UEFI firmware boots from loader.efi on the EFI System
> > > Partition — a separate FAT32 partition that freebsd-update never touches.
> >
> > How do pkgbasified systems handle this?
> >
> 
> pkgbase is out of scope for this; pkgbase package would need post-install
> hook implementation (FreeBSD-loader)
> 
> 
> -- 
> > Gruß
> > Marco
> >
> > Junk-Mail bitte an [email protected]
> >


-- 
Tomoaki AOKI    <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.