Skip to content

Fix Root on ZFS Native Encryption support

Ghost User requested to merge (removed):zfs-encrypt-fix into master

This patch fixes several bugs:

  1. Add zfs_wait to accommodate mpt2sas hardware that does slow asynchronous drive initialization. See here.
  2. Import from zpool.cache file if exist. This is a prerequisite for ZFS pools with persistent block device names. They can not be mounted by zpool import -d /dev.
  3. Enclose variable in double-quotes. Without this, initramfs will fail to unlock encrypted datasets with sh: active, unknown operand.
  4. Use while ! eval to retry password if the input is wrong, instead of dropping into emergency shell.

A detailed Alpine Linux on natively encrypted ZFS installation guide can be found on AlpineWiki, which needs this patch and the patch for eudev. One can try it out in a virtual machine if interested.

Edited by Ghost User

Merge request reports