aboutsummaryrefslogtreecommitdiff
path: root/custom/zfsrollback
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-08-02 23:12:39 -0500
committerCraig Jennings <c@cjennings.net>2026-08-02 23:12:39 -0500
commit72dc6c49636aefd12f707ffc3eeb244744133cae (patch)
treedf9e816ef3109536d4c2b57cbb630040834c4479 /custom/zfsrollback
parent1da64394f637347414ffc4954daf9c72d180e2d0 (diff)
downloadarchangel-main.tar.gz
archangel-main.zip
fix(install): stop encrypted ZFS boots asking for the passphrase twiceHEADmain
ZFSBootMenu unlocks the pool to read the kernel and initramfs, then kexecs into it. The loaded key doesn't survive kexec. The booted initramfs re-imports the pool, finds keylocation=prompt, and asks for the same passphrase again. I write the passphrase to /etc/zfs/zroot.key inside the encrypted root, point the encryption root at it, and bake it into the initramfs. ZFSBootMenu can't read a file in a dataset it hasn't unlocked, so it overrides the file:// URI and prompts once. The booted initramfs then loads the key silently. Nothing weakens at rest. Both the keyfile and the initramfs live inside the encrypted dataset, which only holds because ZFSBootMenu keeps the initramfs inside the boot environment rather than on the ESP. keyformat stays passphrase, since that's what lets ZFSBootMenu accept the typed value. keylocation alone is settable with zfs set, so this never reaches for zfs change-key and never rekeys the pool mid-install. The Btrfs path already did this for LUKS, so I reused its ensure_initramfs_files helper.
Diffstat (limited to 'custom/zfsrollback')
0 files changed, 0 insertions, 0 deletions