[pkg-cryptsetup-devel] Bug#1086685: cryptsetup-initramfs: Fails to include all LUKS LVM PVs required to activate VG

Tj tj.iam.tj at proton.me
Sun Nov 3 20:25:18 GMT 2024


Package: cryptsetup-initramfs
Version: 2:2.6.1-4~deb12u2
Severity: important
X-Debbugs-Cc: tj.iam.tj at proton.me

Discovered this after adding an additional LUKS PV to the primary VG.
When the initramfs-tools hook cryptroot is executed it determines the
slave devices for the root-fs LV via sysfs by descending the slave
devices.

On my workstation I have:

nvme0n1 -> LUKS0 -> ext4 -> /boot/
nvme0n1 -> LUKS1 -> PV1 -> VG -> LV RAID-1 -> rootfs
sda     -> LUKS2 -> PV2 -> VG -> LV RAID-1 -> rootfs
sdb     -> LUKS3 => PV3 -> VG

cryptroot only adds entries for LUKS1 and LUKS2 to cryptroot/crypttab.

As a result VG fails to activate.

I think in the case of LVM it needs to special-case LVM and instead of
descending through file-system slave devices simply identify the VG and
iterate its PVs, then descend through the PV slaves checking if any are inside
a LUKS container until it reaches the base of the device hierarchy.


-- System Information:
Debian Release: 12.7
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security-debug'), (500, 'stable-security'), (500, 'stable-debug'), (500, 'proposed-updates-debug'), (500, 'stable'), (100, 'proposed-updates')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.11.5+debian+tj (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/bash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled



More information about the pkg-cryptsetup-devel mailing list