Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initrd and keyfile_device_mount_options not generated with resume support on LUKS encrypted swap #2217

Open
geckolinux opened this issue Oct 16, 2023 · 0 comments

Comments

@geckolinux
Copy link
Contributor

geckolinux commented Oct 16, 2023

Hi there, this is with Calamares 3.2.61 on Debian 12 (SpiralLinux configuration). libkpmcore12 is at version 22.12.3-1. I'm testing on real hardware (Thinkpad T530 with 128GB SSD), and I have tested in UEFI and legacy BIOS modes. I am installing with the "Erase Disk" partitioning option and "Swap (with hibernate)", on Btrfs root and also testing with XFS. This is from my settings.conf :

- exec:
  - partition
  - mount
  - unpackfs
  - machineid
  - fstab
  - locale
  - keyboard
  - localecfg
  - users
  - displaymanager
  - networkcfg
  - hwclock
  - services-systemd
  - grubcfg
  - bootloader
  - removeuser
  - packages
  - luksbootkeyfile
  - luksopenswaphookcfg
  - plymouthcfg
  - initramfscfg
  - initramfs
  - shellprocess
  - umount

The first problem is that the initrd.img* don't get generated with resume parameters when LUKS is involved. Once booted into the installed system I can manually run update-initramfs -u -k all and it starts hibernating and resuming correctly. I can't figure out how to make it include the resume stuff when it's running inside the chroot environment. The only thing I can think of is to add a single-run service on the first boot of the live system that runs update-initramfs -u -k all, but I don't like that slowing down the boot process of the first boot.
Here's a log from that kind of installation: calamares_XFS.log.txt

There is an additional complication: When the root FS is Btrfs (@ subvolume, and the other subvolumes are: @snapshots, @home, @root, @var@log, @var@lib@AccountsService, @var@lib@blueman, @tmp ) the keyfile_device_mount_options in /etc/openswap.conf is not generated, that line just remains commented. So although the swap partition does work, it doesn't work for resuming from hibernation. When I manually change it to keyfile_device_mount_options="--options=subvol=@" and do a update-initramfs it starts hibernating and resuming correctly.
This is the related bug that I found: #1659
And the commit that should provide this functionality: 6444b42
Here's the log from my installation: calamares.log.txt

Thanks in advance for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant