5 ms·
I have documented the steps I had to take here https://janweitz.de/article/creating-a-zfs-zroot-raid-10-on-ubuntu-16.04/ https://janweitz.de/article/creating-a-
by weitzj 9y ago
I have documented the steps I had to take here https://janweitz.de/article/creating-a-zfs-zroot-raid-10-on-ubuntu-16.04/ https://janweitz.de/article/creating-a-zfs-zroot-raid-10-on-...
Be aware:
Uefi did not work for me in VirtualBox with ZFS.
Booting with UEFI, ZFS and RAIDz works, but I did not figure out how to install the UEFI grub-boot on all RAIDz drives.
Therefore, if the one and only drive with the boot partition fails, I have to rely on an USB-stick as a backup-plan for the bootloader.
Probably if I could start over I would try to skip UEFI and use legacy booting and installing Grub in the MBR of each drive (if that is possible).
For encryption we are using Luks right now, since it encrypts block devices and ZFS uses these block devices to form its raid.
Luks needs to decrypt ALL raid devices inside the Grub boot prompt in order for ZFS to start its raidz.
To make this happen, we had to modify:
/usr/share/initramfs-tools/hooks/cryptroot and remove an early return in a for-loop in get_fs_devices() , since otherwise only the first device was decrypted.
Make sure /etc/lvm/lvm.conf contains use_lvmetad = 0
Make sure /etc/default/grub contains GRUB_ENABLE_CRYPTODISK=y
GRUB_CMDLINE_LINUX_DEFAULT=“text"
So, yeah, I am looking forward for zfs-native encryption on Linux to make booting "safer/easier".
- vetinari 9y agoMaybe I had a better luck, for me, UEFI boot with ZFS in Virtualbox did work. I've used CentOS though. Multiple UEFI boot partition are possible, but just like you note in your article, they have to be outside the ZFS pool. All of them. Then you set order for each one using efibootmgr. For each, you will get a separate entry in UEFI boot manager. It is not necessary to install grub2 after rebooting into ZFS root. It is perfectly fine to run grub2-install in chroot from your temporary installation.