Project renamed: asahi-luks-tooling → asahi-LUKS2-encrypter (old URLs redirect).
Safety & correctness fixes
- Resume after a hard interrupt (power loss / kill) now works:
cryptsetup reencrypt --resume-onlyrefuses with "Device requires reencryption recovery" untilcryptsetup repairruns — the resume path now does repair-then-retry automatically. Found by the new loopback test. - ESP grub stub is never clobbered: GRUB config regenerates only at
/boot/grub2/grub.cfg, never onto the ESP chainload stub (the exact failureboot-guards/esp-grub-stub-guardexists to undo); a clobbered stub is detected and flagged. - An already-open mapper is cross-checked against the selected ROOT partition (closing on mismatch), and an inner-UUID change after open is a typed-override stop — no more silently configuring the wrong system.
- Mounted-target guard (live-desktop automounts) before the
ENCRYPTconfirmation; idempotent shrink (interrupted retries no longer re-shrink 32M each time);snapper create-configactually registers configs; recovery-bundle UUID fallback resolves to a real device path; cryptsetup ≥ 2.4 floor.
New features
- Recovery key: optional random 64-hex second keyslot, enrolled before the header backup so the backup contains it (
LUKS_RECOVERY_KEY=yes|no). --dry-run(orLUKS_DRY_RUN=1): full read-only detection + printed plan, exits before the point of no return.- Non-interactive / fleet:
LUKS_TARGET_ROOT/BOOT/EFIpartition pinning,LUKS_PASSPHRASE_FILE,LUKS_MAPPER_NAME. - KDF profiles: three argon2id presets (aggressive / moderate / fast) with unlock times benchmarked on the running machine; env-pinned parameters below a safety floor are refused.
- 12-point verification gate (was 10): per-kernel initramfs checks for
dm-crypt(auto-repaired if missing) and for keyboard/input drivers — without one you cannot type the passphrase at boot. rhgb quietis stripped so the first passphrase prompt is visible;post-encryption-setup.shrestores it after the first encrypted boot (LUKS_KEEP_SPLASH=1opts out).
Testing & CI
tests/loopback-core-test.sh: the real encrypt / open / recovery-key / hard-kill → repair → resume sequence against a throwaway file-backed loop device (15 checks).- GitHub Actions: shellcheck +
bash -non every script, and the loopback test on x86_64 and aarch64 runners — all green.
🤖 Generated with Claude Code