On 18/09/2025 at 18:16, Harald Dunkel wrote:
Pascal Hambourg wrote:How do you create a partitionable encrypted volume ?You can create a partition table but AFAICS the kernel does not read it. partx fails to add the partitions. partprobe can create device- mapper devices for the partitions, but they are not "real" partitions (even though lsblk says so) and it is not automatic.You could use kpartx, eg
This is the same as parted partprobe, it creates device-mapper devices for the "partitions". They are not kernel partitions.
I am not sure, if a regular initrd includes kpartx, though.
No, the kpartx package does not provide initramfs-tools boot and hook scripts. It provides udev rules but they only seem to manage "partitions" created by kpartx after they have been created. The initramfs includes busybox partprobe but this version cannot create device-mapper devices. So you need to add custom initramfs-tools boot and hook scripts to integrate kpartx in the initramfs.
I would not recommend using a partition table on encrypted volumes; LVM is more flexible and already integrated in the Debian installer and the regular initramfs.