dasharo-issues icon indicating copy to clipboard operation
dasharo-issues copied to clipboard

Boot Menu for BSD based system

Open SebastianCzapla opened this issue 8 months ago • 3 comments

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

SebastianCzapla avatar Apr 24 '25 11:04 SebastianCzapla

Some relevant context here

SebastianCzapla avatar Apr 24 '25 11:04 SebastianCzapla

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 -L seems 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 fatlabel program 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_msdos source 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.

matmacieje avatar Apr 25 '25 14:04 matmacieje

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.

mkopec avatar Apr 25 '25 14:04 mkopec