boot1.efi future

Nathan Whitehorn nwhitehorn at freebsd.org
Wed Oct 18 14:42:39 UTC 2017



On 10/17/17 16:18, Warner Losh wrote:
> I'd like to remove boot1.efi. It's no longer relevant. It was a useful hack
> to get us going, but now it's becoming more of a liability than a win.
>
> There's a lot of work that has been put into it so it can understand every
> filesystem. However, in doing so boot1.efi has morphed into a loader.efi
> without the scripting interpreter. Let's just kill boot1.efi and load the
> full-featured loader directly.
>
> boot1.efi used to have a role to play. It was a tiny, rarely changing bit
> of glue in the UEFI world. It is now none of those things. It has become
> rather large and bloated, and there's work to make it even more so.
>
> My proposal is to fix the one bug in loader.efi that would preclude its use
> as a primary boot loader (it sometimes guesses wrong for currdev and
> loaddev). Once we've done that, we'll use it where we use boot1.efi today.
> It would also simplify the load process and make it easier to implement the
> full EFI Boot Manager protocol from the UEFI specifications. It should also
> make secure boot easier to bring to market.
>
> This dovetails nicely into some of the other changes on-tap for FreeBSD 12.
> efibootmgr is coming soon (I'm reviewing the code from a coworker now).
> There's plans to move the FreeBSD boot loader to
> \efi\FreeBSD\loader-$ARCH.efi when that goes in, since we'll be able to
> point the LoadOptions to that. There's plans to make the installer create
> the EFI partition rather than just dd the efifat file we're doing today.
> Plus, there's work underway to move all the boot block installation stuff
> to a new script (install-boot) as well as efforts to make images for any
> bootable system (spin).
>
> There's lots of details to get right before we can make the final switch,
> but I think it's in the interest of the project to do so.
>
> Comments?

As the guy who wrote boot1.efi in the first place, I think this is a 
great idea. boot1.efi exists to make the boot flow on EFI more like 
non-EFI so that loader can live in /boot on filesystems (UFS, ZFS) that 
EFI doesn't understand, thus preventing the need for a bunch of special 
logic in make installworld. It has seriously outlived its usefulness. 
Thanks for doing this!
-Nathan


More information about the freebsd-arch mailing list