This page collects ideas on how to restructure and improve the cryptsetup initramfs hook script cryptroot.
List of possible setups that need to be supported
(list the devices in a hierarchic order)
Setups with encrypted root fs:
physical block device -> plain dm-crypt -> root
two physical block devices -> two luks devices -> lvm vg -> root, swap, ...
two physical block devices -> two luks devices -> btrfs array -> root
two physical block devices -> two luks devices -> mdadm array -> root
two physical block devices -> mdadm array -> luks -> root
Setups without encrypted root fs (but encrypted resume/swap/initramfs device):
two physical block devices -> two luks devices -> lvm vg -> swap, home, ...
two physical block devices -> two luks devices -> mdadm array -> swap, home, ...
Setups with decrypt_derived keyscript:
- ...