Jump to content

Recommended Posts

Posted (edited)

 After my last update on my radxa5-ITX, apart from the name changes of the NIC (related?), I remarked that I could not cryptroot-unlock the root partition because of dm_mod apparently missing from initramfs. To give some context, this is how I set things up some while ago and things went pretty smooth until recently.
2025-12-11-20-39-09-363.thumb.jpg.e72f1ed0a5cb32bdd46ca98617aee40a.jpg

Too bad armbian does not keep the previous kernel (though I get the reason why). Inspecting the boot partition, 

cat config-6.1.115-vendor-rk35xx | grep DM_CRYPT
CONFIG_DM_CRYPT=m


the kernel seems to have been compiled with the proper option and 

 

lsinitramfs initrd.img-6.1.115-vendor-rk35xx | grep 'usr.*cryptsetup'

usr/lib/aarch64-linux-gnu/libcryptsetup.so.12
usr/lib/aarch64-linux-gnu/libcryptsetup.so.12.9.0
usr/lib/cryptsetup
usr/lib/cryptsetup/askpass
usr/lib/cryptsetup/functions
usr/sbin/cryptsetup

and initramfs seems properly linked to the relevant libraries so I do not understand why device mapper remains unavailable.  At this point, I have no hypothesis except a very unlikely one

An unlikely hypothesis

Could failure to initialize the device mapper have nothing to do with dm_mod availability but be solely the side effect of 
 

2025-12-11-20-40-21-581.thumb.jpg.d8f0d2b06d43a64c45ae82c87060853d.jpg

 

Because I always unlocked the root part either from console or from a dropbear session, I understood device mapper init as an anterior step, independent from NIC availability. But is it really the case. What am I missing?

Edited by David Zarebski
Posted (edited)

So, I chrooted in the system, updated it, used the trixie repos, fixed the NIC issues using a udev rule (aka the unlikely hypothesis) and regenerated the boot image with update-initramfs -u
 

lsinitramfs /boot/initrd.img-6.1.115-vendor-rk35xx | grep cryptsetup
usr/lib/aarch64-linux-gnu/libcryptsetup.so.12
usr/lib/aarch64-linux-gnu/libcryptsetup.so.12.10.0
usr/lib/cryptsetup
usr/lib/cryptsetup/askpass
usr/lib/cryptsetup/functions
usr/sbin/cryptsetup

I'm now certain that the module is loaded with the proper version but the problem remains. What is going on?
Also why, after pointing my apt sources to trixie repos + update and with a kernel v 6.1 (<6.12 current trixie kernel version), does armbian complaining about my system being under Debian forky. I find those multiple layers of versioning pretty confusing.

Edited by David Zarebski
Posted
11 minutes ago, David Zarebski said:

confusing

I am confused as well by getting a clue what you are trying to do :D

Kernel and userspace are independent in Armbian. You can use any userspace (Ubuntu Jammy, Noble, Resolute, Debian Bookworm, Trixie, Forky, Sid) with any kernel package. Latter is always the same.

 

Rockchip RK3588 is a bit special in terms of kernel versions. Let me give you brief overview.

6.1.y is a based on Rockchip BSP kernel which is close to feature-complete but a bit outdated.

6.12.y which is currently our current branch and was the latest mainline LTS kernel until a few days ago. However at the time this was released a bare minimum of drivers were merged into this version

6.18.y (or soon 6.19-rcX) is edge and has a lot more hw features merged into but still isn't feature-complete. Collabora is working on that like crazy.

 

16 minutes ago, David Zarebski said:

, after pointing my apt sources to trixie repos

Userspace upgrades are neither tested nor supported by Armbian. Not because we don't want but because we don't have resources to test all kinds of scenarios for dist-upgrades.

Posted

Thanks for the info about the versioning logic. 

What I'm trying to achieve is simply to be able to unlock my root partition (Cf explanation in my first post), what I could not do anymore after upgrading to 6.1.115. I do not remember choosing a rolling release distro, used for almost a year until this kernel update broke everything.

My update to trixie was simply motivated by the hypothesis that, because of the kernel update, some incompatibility with cryptsetup (resp. dropbear, initramfs.....) might have occurred and could explain this abrupt behavior change. Obviously, it did not but keep in mind that the problem is anterior to any of the changes I realized in the userspace. In a nutshell, my initial problem remains and I still do not get why. Again: 

the kernel seems compiled with the proper option
initramfs points to the proper libraries.
 

Is dm_mod kernel module loaded?
cannot use device rootfs name invalid or still in use


IYO, is it really a matter of kernel module availability?  cryptsetup-initramfs and dropbear-initramfs are available, to my knowledge, UUID are stable entities

cat etc/crypttab
rootfs UUID=7afe59bd-ca3d-4618-ae75-f2e9b417eb71 none initramfs,luks

So I just don't get it. 

I also just try 6.12 but rollback because my system did not even boot despite of the proper symlinks in the boot partition
 

Posted
1 hour ago, David Zarebski said:
Is dm_mod kernel module loaded?

did you check if this module is in the initramfs with lsinitramfs ? Just asking, I saw you looked for the libraries but not for the module. 

Posted

@IBV good call but it looks good to me

 

lsinitramfs -l boot/initrd.img-6.1.115-vendor-rk35xx | grep crypt
drwx------   2 root     root            0 Dec 22 11:35 cryptroot
-rw-------   1 root     root           69 Dec 22 11:35 cryptroot/crypttab
-rwxr-xr-x   1 root     root          246 May  4  2025 scripts/local-block/cryptroot
-rwxr-xr-x   1 root     root          253 May  4  2025 scripts/local-bottom/cryptgnupg-sc
-rwxr-xr-x   1 root     root          449 May  4  2025 scripts/local-bottom/cryptopensc
-rwxr-xr-x   1 root     root         1038 May  4  2025 scripts/local-bottom/cryptroot
-rwxr-xr-x   1 root     root          757 May  4  2025 scripts/local-top/cryptopensc
-rwxr-xr-x   1 root     root         8150 May  4  2025 scripts/local-top/cryptroot
-rwxr-xr-x   1 root     root         5686 May  4  2025 usr/bin/cryptroot-unlock
lrwxrwxrwx   1 root     root           17 Dec 22 11:35 usr/lib/aarch64-linux-gnu/libcrypt.so.1 -> libcrypt.so.1.1.0
-rw-r--r--   1 root     root       198664 Jan 16  2025 usr/lib/aarch64-linux-gnu/libcrypt.so.1.1.0
-rw-r--r--   1 root     root      6302952 Nov  1 12:22 usr/lib/aarch64-linux-gnu/libcrypto.so.3
lrwxrwxrwx   1 root     root           24 Dec 22 11:35 usr/lib/aarch64-linux-gnu/libcryptsetup.so.12 -> libcryptsetup.so.12.10.0
-rw-r--r--   1 root     root       603376 May  4  2025 usr/lib/aarch64-linux-gnu/libcryptsetup.so.12.10.0
lrwxrwxrwx   1 root     root           20 Dec 22 11:35 usr/lib/aarch64-linux-gnu/libtomcrypt.so.1 -> libtomcrypt.so.1.0.1
-rw-r--r--   1 root     root       919496 Nov  1  2024 usr/lib/aarch64-linux-gnu/libtomcrypt.so.1.0.1
drwx------   2 root     root            0 Dec 22 11:35 usr/lib/cryptsetup
-rwxr-xr-x   1 root     root        67912 May  4  2025 usr/lib/cryptsetup/askpass
-rw-r--r--   1 root     root        26980 May  4  2025 usr/lib/cryptsetup/functions
drwxr-xr-x   2 root     root            0 Dec 22 11:35 usr/lib/modules/6.1.115-vendor-rk35xx/kernel/arch/arm64/crypto
-rw-r--r--   1 root     root        19928 Nov 25 15:18 usr/lib/modules/6.1.115-vendor-rk35xx/kernel/arch/arm64/crypto/chacha-neon.ko
-rw-r--r--   1 root     root        17128 Nov 25 15:18 usr/lib/modules/6.1.115-vendor-rk35xx/kernel/arch/arm64/crypto/poly1305-neon.ko
drwxr-xr-x   3 root     root            0 Dec 22 11:35 usr/lib/modules/6.1.115-vendor-rk35xx/kernel/crypto
drwxr-xr-x   2 root     root            0 Dec 22 11:35 usr/lib/modules/6.1.115-vendor-rk35xx/kernel/crypto/async_tx
-rw-r--r--   1 root     root         8424 Nov 25 15:18 usr/lib/modules/6.1.115-vendor-rk35xx/kernel/crypto/async_tx/async_memcpy.ko
-rw-r--r--   1 root     root        16520 Nov 25 15:18 usr/lib/modules/6.1.115-vendor-rk35xx/kernel/crypto/async_tx/async_pq.ko
-rw-r--r--   1 root     root         8768 Nov 25 15:18 usr/lib/modules/6.1.115-vendor-rk35xx/kernel/crypto/async_tx/async_raid6_recov.ko
-rw-r--r--   1 root     root        11400 Nov 25 15:18 usr/lib/modules/6.1.115-vendor-rk35xx/kernel/crypto/async_tx/async_tx.ko
-rw-r--r--   1 root     root        14616 Nov 25 15:18 usr/lib/modules/6.1.115-vendor-rk35xx/kernel/crypto/async_tx/async_xor.ko
-rw-r--r--   1 root     root        15616 Nov 25 15:18 usr/lib/modules/6.1.115-vendor-rk35xx/kernel/crypto/authenc.ko
-rw-r--r--   1 root     root        16792 Nov 25 15:18 usr/lib/modules/6.1.115-vendor-rk35xx/kernel/crypto/authencesn.ko
-rw-r--r--   1 root     root         8592 Nov 25 15:18 usr/lib/modules/6.1.115-vendor-rk35xx/kernel/crypto/echainiv.ko
-rw-r--r--   1 root     root        20176 Nov 25 15:18 usr/lib/modules/6.1.115-vendor-rk35xx/kernel/crypto/essiv.ko
-rw-r--r--   1 root     root         9344 Nov 25 15:18 usr/lib/modules/6.1.115-vendor-rk35xx/kernel/crypto/md4.ko
-rw-r--r--   1 root     root         8352 Nov 25 15:18 usr/lib/modules/6.1.115-vendor-rk35xx/kernel/crypto/michael_mic.ko
-rw-r--r--   1 root     root         9352 Nov 25 15:18 usr/lib/modules/6.1.115-vendor-rk35xx/kernel/crypto/seqiv.ko
-rw-r--r--   1 root     root        84336 Nov 25 15:18 usr/lib/modules/6.1.115-vendor-rk35xx/kernel/drivers/md/dm-crypt.ko
drwxr-xr-x   2 root     root            0 Dec 22 11:35 usr/lib/modules/6.1.115-vendor-rk35xx/kernel/lib/crypto
-rw-r--r--   1 root     root         5272 Nov 25 15:18 usr/lib/modules/6.1.115-vendor-rk35xx/kernel/lib/crypto/libchacha.ko
-rwxr-xr-x   1 root     root       288448 May  4  2025 usr/sbin/cryptsetup

 

Posted

The error talks about dm-mod kernel module and not dm-crypt. Can you confirm that dm-mod exists in your initramfs? Just to eliminate this being the issue.

Posted
lsinitramfs -l boot/initrd.img-6.1.115-vendor-rk35xx | grep dm-mod
-rw-r--r--   1 root     root       249464 Nov 25 15:18 usr/lib/modules/6.1.115-vendor-rk35xx/kernel/drivers/md/dm-mod.ko

 

Looks like it is. Interestingly, when I update-initramfs -u, I do get warning about mdadm (failing to scan array) but I thought that the two issues were unrelated.  Could it have an effect on the mapper availability?

 

update-initramfs -u
update-initramfs: Generating /boot/initrd.img-6.1.115-vendor-rk35xx
W: mkconf: MD subsystem is not loaded, thus I cannot scan for arrays.
W: mdadm: failed to auto-generate temporary mdadm.conf file.

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines