ocochard / BSDRP

BSD Router Project
https://bsdrp.net
Other
177 stars 38 forks source link

UEFI boot support #26

Open olevole opened 5 years ago

olevole commented 5 years ago

it would be useful to have UEFI boot mode

mhalden commented 5 years ago

AFAIK the efi loader still doesn't have support for bootme/bootonce or anything equivalent which is needed to select the image to boot. I have heard some talk about using nvvars for this, but I'm not sure if anything has happened.

Upstream bug report: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=201788

olevole commented 5 years ago

Got it. Just wondering in which case it is used. Secure/safe BSDRP/firmware update?

mhalden commented 5 years ago

Updates are done by writing a full system image to second inactive partition and then reboot to that partition, this makes rollbacks very easy. This is done with the bootme/bootonce flags when using gpt or an equivalent flag in mbr which I don't remember the name of. (I believe bsdrp uses mbr by default.) Without a way to signal to the loader what partition they should boot from the update functionality won't work as-is since you're stuck on one of the images.

olevole commented 2 years ago

FYI: efibootmgr can be used to manage boot device, also UEFI VARS support for bhyve was committed recently: https://reviews.freebsd.org/D19976

f-andrey commented 2 years ago

stand/efi/boot1: Add boot partition selection 207940 another waiting bug

mhalden commented 2 years ago

We currently use gptboot.efi instead of loader.efi, which implements support for the bootme and bootonce flags.

ocochard commented 1 year ago

This depend of the framework migration (nanobsd -> poudriere), the new image generated with poudriere will be dual BIOS/EFI.