Port-amd64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH] BIOS boot vs EFI system partition mountpoint



> On Aug 20, 2022, at 5:00 AM, Taylor R Campbell <riastradh%NetBSD.org@localhost> wrote:
> 
> I'd like to have a standard mount point for the EFI system partition
> on platforms with EFI boot.  On NetBSD/arm, this is /boot (which is
> also shared with non-EFI boot on some Arm boards), and on NetBSD/riscv
> it'll probably be the same eventually.
> 
> Currently on x86, BIOS boot requires a secondary bootloader at /boot
> in the root file system.  EFI boot doesn't require any secondary
> bootloader, so /boot could also be the ESP mountpoint in principle,
> but it would pose a conflict for a hybrid image that boots with
> _either_ BIOS or EFI and has the ESP mounted.
> 
> I propose to change NetBSD/x86 BIOS boot so it looks for the secondary
> bootloader at /biosboot instead of /boot, but falls back to /boot.
> That way, a hybrid image can have /biosboot as well as the ESP mounted
> at /boot, and we can have /boot as the standard mount point for ESP on
> platforms with EFI boot.
> 
> The attached patch changes bootxx_* -- except bootxx_fat12/fat16[*] --
> to try /biosboot first and then fall back to /boot, and patches
> sysinst to install the BIOS bootloader at /biosboot instead of /boot.
> I've tested BIOS and EFI boot under qemu with the same image.

Should also rename /usr/mdec/boot to /usr/mdec/biosboot.  And you can probably play pointer tricks in the FAT versions to get the fallback name pretty easily.  Just would be nice for it to be consistent across the different image types.

> 
> OK?
> 
> 
> [*] I suspect tbootxx_fat12/fat16 have tighter space constraints.
>    It's possible, even if there are space constraints, that we could
>    fit logic to try /biosboot first and then /boot.  But they are
>    also hand-written assembly, I don't know how to test them, and I
>    doubt they're relevant on any hybrid images anyway, so I didn't
>    change them.
> <biosboot.patch>

-- thorpej



Home | Main Index | Thread Index | Old Index