Date: Tue, 15 Dec 2020 08:58:29 -0700 From: Warner Losh <imp@bsdimp.com> To: Poul-Henning Kamp <phk@phk.freebsd.dk> Cc: "freebsd-hackers@freebsd.org" <hackers@freebsd.org> Subject: Re: Should/does loader.efi respect the "bootme" GPT attribute ? Message-ID: <CANCZdfpcrXcgnh1O74A-MhSO2NFqTtq0rJrBDpEfwgxbVDPN8A@mail.gmail.com> In-Reply-To: <25469.1608040822@critter.freebsd.dk> References: <25469.1608040822@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Dec 15, 2020 at 7:00 AM Poul-Henning Kamp <phk@phk.freebsd.dk> wrote: > It looks to me like the GPT attributes "bootme", "bootonce" and > "bootfailed" > are unknown to loader.efi ? > BIOS "loader" doesn't respect these flags either. That's done by gptboot. The equivalent in UEFI land is gptboot.efi. > Is this intentional or should it be fixed ? > It is intentional. UEFI really doesn't want you using non-standard partition flags to determine boot order. We provide a way to do it with gptboot.efi, but UEFI makes it hard to support. loader.efi is kinda late in the process anyway, and it's main loop makes supporting gptboot-like functionality hard due to the way things are ordered and how gptboot rewrites the GPT partition table at different points in the boot. UEFI has its own bootnext protocol, that works in conjunction with the EFI environment variables to have a more robust, less 'guess what I mean' approach. So all in all, it's hard, non-standard and doesn't play well with UEFI. I wrote gptboot.efi for USB sticks where we have two systems installed that travel from system to system. It's a bit hacky, but I needed something that worked in a mixed UEFI and BIOS environment that was in place at our system integrators. There's some times you gotta not play well, but this won't work everywhere :) Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpcrXcgnh1O74A-MhSO2NFqTtq0rJrBDpEfwgxbVDPN8A>