24 Feb 2024
Boot existing FreeBSD System with ZFS from LiveCD
It took me a ridiculous amount of time in order to find how to boot into an existing ZFS FreeBSD installation from a FreeBSD LiveCD (I used mini-memstick).
Finally, after hard searching on the web, someone mentioned the magic invocation, and from there I deducted the remaining parts.
When you’re presented the FreeBSD loader, press 3 in order to get the console, then do the following:
To load kernel, the ZFS kernel module and the nullfs kernel module.
> load /boot/kernel/kernel
> load /boot/kernel/zfs.ko
> load /boot/kernel/nullfs.ko
Then specify the root device (don’t forget the trailing colon):
> set currdev="zfs:zroot/ROOT/default:"
And finally
> boot
will boot using the LiveCD kernel and will proceed with booting the original operating system, where you will be able to fix your shit with a comfortable environment. Because yes, you could probably fix whatever is needed from the LiveCD but it’s honestly less convenient than your fully customized shell.
Taken from:
https://imil.net/blog/posts/2021/boot-zfs-from-freebsd-livecd/