mfsbsd
mfsbsd copied to clipboard
Enable UEFI booting (Supporting hybrid boot)
This PR enables UEFI booting while maintaining BIOS booting, I used the official FreeBSD approach on this.
I removed the mkisofs support because official FreeBSD release scripts uses makefs.
Finally I had to use the XigmaNAS loader.efi file that is custom compiled so the mfsroot.gz file can be loaded.
I tried to use official loader.efi but was failing even using 11.3-STABLE ISO with this commit.
The error I was seeing was:
Fixes #73.
@amontalban , Any update on issue which i reported . do i need to try something else.
This patch in freebsd should fix the loader.efi size problem permanently
https://reviews.freebsd.org/rS355132
It seems it's still not EFI-bootable, right?
I'm about to hand out a lot of rescue USB sticks built using ventoy. Among a lot of Linux's that I love considerably less, I happily put mfsbsd on them. but testing in VBox shows it won't boot in EFI mode. So I gotta remove it again, that's really sad :(
I would also like to see a UEFI-bootable mfsBSD. How can I help?
My ultimate goal is however to PXE-netboot mfsBSD to hosts with UEFI-only BIOSes (no legacy boot support). I have been PXE-netbooting mfsBSD images with pxelinux for more than a decade, but what worked on BIOS-based machines, does not work on UEFI-based ones.
Is a UEFI boot known to work at this time? That is, work just as well as a standard FreeBSD install.
My own efforts show that the mfsBSD system isn't recognised as a valid boot entry and so it appears from a UEFI boot that there is no OS installed. Under BIOS, it boots fine. On the other hand, a base FreeBSD (13, encrypted ZFS root for example) install boots just fine in UEFI mode. This has been the case for me on a couple of systems.
I'm wondering if it's possible to increase the chances that the resultant mfsBSD "install" is seen as a bootable OS by primarily building on top of what a standard FreeBSD (13) install would produce, and then hand modifying the result to make it a memory filesystem like image. This would lose the flexibility of just being able to "dd" an image onto a system, but would still achieve the main end result that I value, which is running the system as an MFS. Along those lines I'm wondering if some other memory root subsystem would also work, like a root filesystem of type tmpfs, or one whose free space is dictated by free RAM instead of a prearranged maximum value.
If there is a "failsafe" approach to adapting a FreeBSD install to become that of a memory filesystem / tmpfs like root, I wouldn't mind running the steps manually. However I'm not sure in principle which boot loader "properties" (and other correlated changes) are necessary to make the resultant boot MFS-like. Any thoughts are appreciated.