| 10 May 2026 |
Albert Larsan | I have hibernation working with impermanence on btrfs in lvm in luks (and my hibernate swap is in the lvm too) on my fw 13. It even works with secure boot! | 12:34:47 |
trumee | Do i need to setup a swap file or a swap partition for hibernation? | 13:02:22 |
trumee | Filesystem of my choice is ZFS but hiberanation doesnt work on it. | 13:02:44 |
trumee | this soungs good. are there any instructions anywhere which i can follow? | 13:06:35 |
trumee | * this sounds good. are there any instructions anywhere which i can follow? | 13:06:42 |
Just Some Dude | Should be an option if you’re using the installer right? | 13:26:35 |
Albert Larsan | There is boot.resumeDevice option if you have a swap partition (which is easier) | 13:40:42 |
Albert Larsan | If you can manage to navigate the mess that are my dotfiles, you can look at the spruce-frame host at https://git.sr.ht/~albertlarsan68/dotfiles
TMDU: The disk is crypted by luks. Inside luks there is a lvm PV. The VG contains two LVs: A 64-gig swap (for hibernation) and the rest is my btrfs volume. Standard-ish Impermanence setup, just made sure that the script that cleans up the root only runs once resume has been attempted. | 13:49:03 |
sudoforge | ah, fair. hibernation on a zvol is a bad idea (although technically still... possible) | 13:52:06 |
sudoforge | you'd just need to patch the kernel to address the missing support :P | 13:53:05 |
sudoforge | are you using disko to configure your disk, by chance? | 13:54:07 |
sudoforge | * | 13:57:30 |
trumee | no i am not using disko atm. | 14:00:11 |
trumee | I am currently using ZFS, but planning to migrate since i need hibernation. | 14:00:51 |
sudoforge | well, the good news is that a separate swap partition would work fine, and can be encrypted (if you do that), so you can continue using ZFS as your main filesystem. | 14:05:07 |
Albert Larsan | Note that having multiple LUKS containers on a single system has… complications. | 14:06:01 |
sudoforge | others have already addressed what you need to do, but i'd be happy to provide additional clarification if needed. | 14:06:00 |
sudoforge | i haven't found that to be the case at all. | 14:06:35 |
Albert Larsan | I have auto-unlock with TPM on my server machines, and getting that to behave was a journey | 14:07:22 |
sudoforge | i have passphrase fallback, and use clevis + tang for my servers. | 14:08:11 |
Albert Larsan | And typing two unlock passphrases at boot is annoying too (especially on a laptop) | 14:08:31 |
sudoforge | you only need to do that if the passphrase differs. | 14:08:54 |
Albert Larsan | Having swap and storage live in the same lvm vg is nice to be able to modulate size between the two without having to resize the luks containers (which is a royal pain IME) | 14:11:37 |
Albert Larsan | I was trying to unlock a data disk with a keyfile on the main (tpm-unlocked) disk, but I abandonned this and went to unlock both disks with the tpm instead. | 14:12:41 |
sudoforge | ah, neat. my servers all have passphrase fallback, which i can administer through IMPI, but primarily boot and decrypt the disks using clevis and tang, requiring 2 of 2: TPM, and the tang server | 14:14:27 |
sudoforge | * | 14:15:45 |
Albert Larsan | I use laptops for servers, so no IPMI. There is ssh-based passphrase fallback, but it requires me to notice that the host is down, find a way to connect to its initrd ssh, and remember the correct command to ask systemd to prompt me the password. | 14:15:52 |
Albert Larsan | I use systemd-crypt{setup,enroll}, not clevis though | 14:16:57 |
trumee | I am not sure if hibernate is safe with zfs, https://github.com/openzfs/zfs/issues/12842 | 14:18:20 |
trumee | also, https://github.com/NixOS/nixpkgs/blob/93de6bf9ed923bf2d0991db61c2fd127f6e984ae/nixos/modules/tasks/filesystems/zfs.nix#L229-L236 | 14:20:12 |