Boot Menu for BSD based system
The problem you're addressing (if any)
FreeBSD based systems, like OPNsense, or pfSense, are not visible in boot menu in a human readable way. To boot them we either boot the device, (which has no indication of OS installed on it), or we do boot from file, pick correct device, and then traverse efi partition to pick loader.efi
Copying solution used for Linux systems, which is identification via path on efi partition does not work for BSD based systems, as all of them are installed under \EFI\freebsd\loader.efi. To add to problem, BSD installer does not label the partition, so we cannot use this mechanism to identify system too.
Describe the solution you'd like
Anything that allows us to see boot entries like "OPNsense on SAMSUNG NVME[...]" or "FreeBSD on SAMSUNG NVME[...]"
Where is the value to a user, and who might that user be?
For testers, this allows to use OSFV without major changes, as we could use the Boot OS keywords without much tweaking
For regular users of Dasharo, this will make multi-OS installs easier to navigate.
Describe alternatives you've considered
Adding .os_id file to efi partition as part of install, and making the EDK2 identify OS via this file, if no such file is found, like when using default installer, nothing happens.
Additional context
No response
Some relevant context here
Some questions and remarks (from Boot From File perspective):
- What exactly is partition name (volume label) displayed in Dasharo File Explorer? From what I figured out, this is not GPT entry name, at least not for ESPs.
- What is acceptable depth or installer pre-seeding or OS post-install configuration? Changing pfSense installer behavior to name ESP with
newfs_msdos -Lseems to be very complicated (and I'm not FreeBSD expert). But automated tar-ing ESP contents and recreation of ESP filesystem with proper (i.e. PFSBOOT) volume label works, already tested. - Full FreeBSD distribution contains
fatlabelprogram binary (from dosfstools package) in form of Linux executable. We can't run it under any *Sense (lack of Linux Binary Compatibility), but running this program from i.e. Ubuntu is close to running it from BSD. - Preparing our own labeling program, based od
newfs_msdossource may be an option. It would be FreeBSD-specific and it would run without Linux Binary Compatibility, so it potentially may be upstreamed to FreeBSD distributions in question.
Duplicate of https://github.com/Dasharo/dasharo-issues/issues/735 ?
It seems to me that the fundamental issue that needs to be resolved is https://github.com/Dasharo/dasharo-issues/issues/1001 . Fix that, and freebsd should be able to add itself to the boot menu, just as it does on proprietary BIOSes.