Hi.
I am trying to setup a FreeBSD 14.0-RELEASE system, with uefi boot, to mount a zfs file system as root that also has a ufs partition containing an alternate root fs as a fall back. I am using loader.conf to configure it to boot using the zfs root fs. I want to be able to do that without having dependencies on the ufs root if possible. Or in worse case, not rely on the ufs root for anything but loader.conf.
I am having several problems that I hope somebody can shed some light on.
I do have loader.efi installed in the uefi fs as /efi/boot/bootx64.efi.That part is working fine.
My /boot/loader.conf.d/loader.conf file contains
First, I can only get loader to read the loader.conf from the ufs file system. Is there any way to get it to read loader.conf from the zfs file system? It seems this would somehow have to be configured in the uefi boot. Ideally, it seems that I should have the ability to put a configuration file for loader in the uefi file system but I have found no documentation indicating that is possible.
This allows it come up with zroot/root1 mounted on root (/). But the problem is, it still loads the kernel and modules from the ufs file system.
If I put
in loader.conf, it panics on boot, does a hex dump of some data, and says,
Yet, without that in the loader.conf, I can drop to the loader prompt at boot, by hitting option 3 in the loader menu, and manually enter
then run "autoboot", and it boots into the zfs root just fine and also loads the kernel and modules from zfs like I want.
I am having a hard time finding any complete up to date documentation with working examples. What few examples I have found show the colon at the end of the currdev setting. I did find a comment or two in forums where somebody said, "Don't forget the colon at the end", but nobody says why. The
setting doesn't require it. There doesn't seem to be any colon required at the end of any of the other settings. So why does currdev require it? I confirmed it is required. It didn't work without it.
Although it is not as simple as it should be, I can live with having to reconfigure loader.conf to switch between different root file systems, but I need it to completely switch and not load some stuff from one and the rest from another (which might not even be the same version).
Although not ideal, I can even live with loader.conf always being read from the ufs file system, even though I am booting to zfs, but it is imperative that it load the kernel and modules from the same file system that it is mounting as root.
I am trying to setup a FreeBSD 14.0-RELEASE system, with uefi boot, to mount a zfs file system as root that also has a ufs partition containing an alternate root fs as a fall back. I am using loader.conf to configure it to boot using the zfs root fs. I want to be able to do that without having dependencies on the ufs root if possible. Or in worse case, not rely on the ufs root for anything but loader.conf.
I am having several problems that I hope somebody can shed some light on.
I do have loader.efi installed in the uefi fs as /efi/boot/bootx64.efi.That part is working fine.
My /boot/loader.conf.d/loader.conf file contains
zfs_load=YES
vfs.root.mountfrom="zfs:zroot/root1"
First, I can only get loader to read the loader.conf from the ufs file system. Is there any way to get it to read loader.conf from the zfs file system? It seems this would somehow have to be configured in the uefi boot. Ideally, it seems that I should have the ability to put a configuration file for loader in the uefi file system but I have found no documentation indicating that is possible.
This allows it come up with zroot/root1 mounted on root (/). But the problem is, it still loads the kernel and modules from the ufs file system.
If I put
currdev="zfs:zroot/root1:"
in loader.conf, it panics on boot, does a hex dump of some data, and says,
panic: free: guard1 fail @ 0x6b540f30 from unknown:0
Yet, without that in the loader.conf, I can drop to the loader prompt at boot, by hitting option 3 in the loader menu, and manually enter
set currdev="zfs:zroot/root1:"
then run "autoboot", and it boots into the zfs root just fine and also loads the kernel and modules from zfs like I want.
I am having a hard time finding any complete up to date documentation with working examples. What few examples I have found show the colon at the end of the currdev setting. I did find a comment or two in forums where somebody said, "Don't forget the colon at the end", but nobody says why. The
vfs.root.mountfrom="zfs:zroot/root1"
setting doesn't require it. There doesn't seem to be any colon required at the end of any of the other settings. So why does currdev require it? I confirmed it is required. It didn't work without it.
Although it is not as simple as it should be, I can live with having to reconfigure loader.conf to switch between different root file systems, but I need it to completely switch and not load some stuff from one and the rest from another (which might not even be the same version).
Although not ideal, I can even live with loader.conf always being read from the ufs file system, even though I am booting to zfs, but it is imperative that it load the kernel and modules from the same file system that it is mounting as root.