#792456 debian-installer: partman fails encrypting swap

Package:
debian-installer
Source:
debian-installer
Description:
Debian Installer documentation
Submitter:
Pierre Dinh-van
Date:
2023-04-25 01:27:04 UTC
Severity:
important
Tags:
#792456#5
Date:
2015-07-14 22:16:33 UTC
From:
To:
While creating an encrypted swap partition in partman, it fails with the kernel
message "Unable to find swap-space signature". Which blocks going further in
the install process.

It seams that after initialisation of the underlaying luks device, partman
forgets to run mkswap on the openened device.

After the error occurs :

# swapon /dev/mapper/md1_crypt
swapon: /dev/mapper/md1_crypt: Invalid argument
# mkswap /dev/mapper/md1_crypt
# swapon /dev/mapper/md1_crypt
#


Workaround is to remove swap partition and activate it when installation is done.

#792456#10
Date:
2023-04-25 01:19:55 UTC
From:
To:
The last few debian releases (buster and bullseye at least) configuring
encrypted swap has been broken for me. I don't know if it's the same as
what the user in #792456 is seeing, but likely.

I have most recently tested it in Bookworm RC1 and here is what I did:
* run by hand partitioning
* create 3 partitions: boot, swap, lvm
* configure encryption: enable encryption for swap and lvm partitions
   * configure swap to use serpent and random passphrase
   * configure lvm partition to use serpent and key
   * finish
* mark lvm encrypted partition to be used for lvm, configure lvm, setup
root and var partition
* configure boot partition to be ext4 mounted at /boot
* finish partitioning
* receive error about failure to setup swap

Sorry for the short report, I will try to redo it and capture logs, but
I wanted to report this ASAP.

My workaround has been to allocate the partition but mark it do not use
and then finish the setup by hand after install.

Thanks,