Show HN: Zectl – ZFS Boot Environment Manager for Linux
ramsdenj.com
ramsdenj.com
The work lappy runs ubuntu with zfs on root, and it's pretty seamless, I'm very much onboard with it having boot environments! (zsys)
I'd love to see automated ZFS-on-root setup, but suspect that'll have to come from Canonical if we ever get it.
There are third party scripts to accomplish this. I would look at https://github.com/saveriomiroddi/zfs-installer. The only reason I have not used it is that I had already written my own https://github.com/HankB/Linux_ZFS_Root. And in this case, better the devil I know. (I'm presently updating my script to follow the most recent instructions at https://github.com/openzfs/zfs/wiki/Debian-Buster-Root-on-ZF...)
ZFS-installer appears to be more mature and is seeing more effort than mine. Perhaps I should give it a try.
libze_util_temporary_mount would be a good candidate for using (or being replaced by?) the recently-introduced zfs_mount_at in libzfs once that's widely available enough. That was a fairly trivial addition to libzfs that was initially made to support libbe's be_mount(), which previously used the effectively non-portable amount() [post-mortem: should read zmount, but autocorrect is alwayscorrect]
Thanks for the tip, the temporary mounting seems a bit like a hack so that's good to know there's a better option.
I only know how to use the systemd-ask-password hack to decrypt non-root datasets, but can’t get my head around how that would work with fully encrypted root dataset.
https://github.com/archzfs/zfs-utils/blob/master/zfs-utils.i...
[edit: this is done in our loader, so presumably you'd use grub?]