#1076099 debian-installer: LVM's activation broken for volumes with the dm-integrity feature

#1076099#5
Date:
2024-07-10 18:18:46 UTC
From:
To:
Dear Maintainer,

In a VirtualBox virtual machine I've converted a LVM volume with the following options:

~# lvconvert --raidintegrity y --raidintegritymode bitmap ...

When I boot in rescue-mode that machine using the "debian-12.5.0-amd64-DVD-1.iso" iso, I follow all configuration steps until D-I asks me which device I want to mount as root filesystem (for running a shell into), then it happens that the volume is shown but if selected an error message it appears on the screen (red) that it says:
---
No such device
The device you entered for your root file system (/dev/vg0/lv1) does not exist. Please try again
---

Then I choose to run a shell without mount a root filesystem and I try to manually activate the LVM's volume, but it fails with this error message:

~# vgchange -a y vg0
modprobe: FATAL: Module dm-integrity not found in directory /lib/modules/6.1.0-18-amd64
  /sbin/modprobe failed: 1
  Can't process LV vg0/lv1_rimage_0: integrity target support missing from kernel?
  0 logical volume(s) in volume group "vg0" now active

The kernel version of D-I is:

~# uname -a
Linux bw12 6.1.0-18-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) x86_64 GNU/Linux

I suggest to add "dm-integrity" module to kernel image enabling the configuration entry CONFIG_DM_INTEGRITY=m and possibly add the "dm-integrity" module's name to /etc/initramfs-tools/modules file in order to automatically activate at boot time the LVM volumes with the integrity feature enabled.

Possible workaround: use a live iso (debian-live-12.5.0-amd64-kde.iso) and manually activate the LVM volume with the command:

~# vgchange -a y volume_group_name

Cheers

#1076099#10
Date:
2024-07-10 18:51:41 UTC
From:
To:
Hi Franco,

Franco <martellif67@gmail.com> (2024-07-10):

The first bit has been here for a very long while (linux 4.17.3-1,
back in 2018), but we would need dm-integrity to be added to linux's
debian/installer/modules/md-modules for that to become available in
the installer.

Cc-ing the kernel team for the time being, I have no clue whether it
makes sense to have that included for everyone, or if that's solving
a corner case (as far as I understand it you enabled a feature that's
not turned on by default). {Making,Keeping} rescue mode {more,} useful
is a worthy goal but it's really not meant to compete with a dedicated
rescue-oriented image (or even general-purpose images like live ones).


Cheers,