I've hit a regression after upgrading my Debian 12 laptop to Trixie -
in short, cryptsetup hangs at *early* boot stage when it apparently trying to create a device mapper node for a LUKS1 device it successfully opened.
LUKS2 devices behave just fine.
[…]
2. Then the boot process hangs for a while and then fails with the message telling it failed to bring up the /boot partition and hence the local-fs.target failed to be brought up, as well - bailing into the
emergency mode (which was unusable as I had root account with the locked password, but this is another story).
[…]
The most weird thing is that if I comment out a line for that /boot
partition in /etc/fstab so that it's not attempted to be brought up at boot and then manually open the device using cryptsetup after the system as
booted - it gets opened just fine.
1. https://cryptsetup-team.pages.debian.net/cryptsetup/encrypted-boot.html
I've hit a regression after upgrading my Debian 12 laptop to Trixie -
in short, cryptsetup hangs at *early* boot stage when it apparently trying to
create a device mapper node for a LUKS1 device it successfully opened. LUKS2 devices behave just fine.
[…]
2. Then the boot process hangs for a while and then fails with the message telling it failed to bring up the /boot partition and hence the local-fs.target failed to be brought up, as well - bailing into the emergency mode (which was unusable as I had root account with the locked password, but this is another story).
[…]
The most weird thing is that if I comment out a line for that /boot partition in /etc/fstab so that it's not attempted to be brought up at boot and then manually open the device using cryptsetup after the system as booted - it gets opened just fine.
AFAICT it doesn't hang at early boot (initramfs) stage, but rather after
the system has been handed over to systemd.
I've noticed that the boot process brings up the LUKS2-encrypted root parition just fine
and tried to debug the boot process by booting the kernel with the
root=/dev/mapper/root-crypt init=/usr/bin/bash
arguments and then trying to open the LUKS1-encrypted /boot by hand.
Here is what happens:
- cryptsetup is able to verify the password used for one of the key slots
just fine.
- But when I run it to actually open the device it
1. Successfully opens the device and creates a node available via
dmsetup (sorry, I don't know the correct terminology - I mean, one
can see the new device by running `dmsetup ls` and mount it as
/dev/dm-2).
2. It then hangs dead - apparently when attempting to create a node
under /dev/mapper.
Do you have systemd-cryptsetup installed? (See the NEWS entry for systemd=256-2, which I guess should be in the release notes too.)
1. https://cryptsetup-team.pages.debian.net/cryptsetup/encrypted-boot.html
I need to review and update this page
GRUB can open LUKS2 devices these days.
On Wed, Jul 02, 2025 at 01:00:39AM +0200, Guilhem Moulin wrote:
I've noticed that the boot process brings up the LUKS2-encrypted root
parition just fine
In my original mail I've mistakenly said "boot" there ^, but in fact it was the root partition.
and tried to debug the boot process by booting the kernel with the
root=/dev/mapper/root-crypt init=/usr/bin/bash
arguments and then trying to open the LUKS1-encrypted /boot by hand.
Here is what happens:
- cryptsetup is able to verify the password used for one of the key slots
just fine.
- But when I run it to actually open the device it
1. Successfully opens the device and creates a node available via
dmsetup (sorry, I don't know the correct terminology - I mean, one
can see the new device by running `dmsetup ls` and mount it as
/dev/dm-2).
2. It then hangs dead - apparently when attempting to create a node
under /dev/mapper.
So, the kernel gets booted with /usr/bin/bash as its init process, and so I assume there are no parts of systemd running - except maybe something from initrafms (?).
Still, in this scenario, the LUKS2-formatted root partition
gets brought up just fine and has a node under /dev/mapper created for it just
fine (and it allows the root= kernel argument to work in my case), but a manual attempt to bring up the LUKS1-formatted /boot partition hangs.
Hence I'm inclined to think it's still an "early boot" issue
Do you have systemd-cryptsetup installed? (See the NEWS entry for
systemd=256-2, which I guess should be in the release notes too.)
Hence I'm inclined to think it's still an "early boot" issue
No it's not.
Do you have systemd-cryptsetup installed? (See the NEWS entry for
systemd=256-2, which I guess should be in the release notes too.)
You need to install the systemd-cryptsetup binary package to let systemd automatically unlock your boot device. See #1079644 or #1076208.
Do you have systemd-cryptsetup installed? (See the NEWS entry for
systemd=256-2, which I guess should be in the release notes too.)
You need to install the systemd-cryptsetup binary package to let systemd
automatically unlock your boot device. See #1079644 or #1076208.
Yes, your guess was a spot-on: installing cryptsetup-system fixed the issue completely for me.
Looks like I'm going to propose an addition to the release notes as folks in the bugs you mentioned basically have hit the same problem.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (0 / 16) |
Uptime: | 161:49:19 |
Calls: | 10,385 |
Calls today: | 2 |
Files: | 14,057 |
Messages: | 6,416,500 |