I would like to know if anyone got ZFS on Root with encryption to work. (LUKS or ZFS in house encryption).
I have tried it several times in the past days with either creating my own zpool with all options and toggles I could find
or with creating a LUKS partition and installing zfs on top but there was no setup, that booted.
With LUKS I got grub to boot, only to be prompted with the error, that the kernel modules are not loaded.
If I type modprobe zfs it does work. So I assumed that it is only a matter of adding 2 Strings in /etc/default/grub or /boot/grub/grub.conf. But I could not find anything.
With ZFS in "standard mode" I got it to boot successful, but I need encryption. Since the CLI does not seem to support it, I tried creating a zpool with encryption key, etc. and adding datasets as suggested by several (ArchLinux) Articles about ZoR. Or only creating the zpool and than create the datasets via setup-tool. This resulted in a grub-error, where grub is unable to understand the filesystem.
What I tried:
zpool create -f -o ashift=12 -O acltype=posixacl -O relatime=on -O xattr=sa -O dnodesize=legacy -O normalization=formD -O mountpoint=none -O canmount=off -O devices=off -R /mnt -O compression=lz4 -O encryption=aes-256-gcm -O keyformat=passphrase -O keylocation=prompt -d -o feature@allocation_classes=enabled -o feature@async_destroy=enabled -o feature@bookmarks=enabled -o feature@embedded_data=enabled -o feature@empty_bpobj=enabled -o feature@enabled_txg=enabled -o feature@extensible_dataset=enabled -o feature@filesystem_limits=enabled -o feature@hole_birth=enabled -o feature@large_blocks=enabled -o feature@lz4_compress=enabled -o feature@project_quota=enabled -o feature@resilver_defer=enabled -o feature@spacemap_histogram=enabled -o feature@encryption=enabled -o feature@spacemap_v2=enabled -o feature@userobj_accounting=enabled -o feature@zpool_checkpoint=enabled tank /dev/nvme0n1p3 zfs create -o mountpoint=none tank/data zfs create -o mountpoint=none tank/ROOT zfs create -o mountpoint=/ -o canmount=noauto tank/ROOT/default zfs create -o mountpoint=/home tank/data/home zfs create -o mountpoint=/root tank/data/home/root zpool set bootfs=tank/ROOT/default tank
I hope someone can help
Thanks in advance!