See additionnal info. What type of compression do you have for initrd
and modules?
On Fri, 7 Mar 2025 20:43:08 +0100 Marc Haber <mh+debian-bugs@zugschlus.de> wrote:
On Fri, Mar 07, 2025 at 05:44:00PM +0100, Eric Valette wrote:
CONFIG_MODULE_DECOMPRESS=y
So the culprit is there. It is not set in my own kernel build (never been so far although config has been created via the official linux-source-6.6) and thus I cannot load compressed modules without user space helpers that probably not exist in initrd busybox version. Of course I can load
compressed modules once the pivot_root/switch_root is done.
So it remains a bug because the script store compressed modules in initrd without checking this compilation flag and the kernel does not boot. If was not doing this in 145. This is the reason for the bug I have.
A second bug is that the initrd does not seems to be compressed while config says it should be with zstd (and the CONFIG_RD_* is ok). I can change to xz.
A third one is that compressing compressed file is not efficient in term of size. There has been bug opened exactly on this theme on other
distributions.
On Fri, 7 Mar 2025 20:43:08 +0100 Marc Haber
<mh+debian-bugs@zugschlus.de> wrote:
On Fri, Mar 07, 2025 at 05:44:00PM +0100, Eric Valette wrote:
CONFIG_MODULE_DECOMPRESS=y
So the culprit is there. It is not set in my own kernel build (never
been so far although config has been created via the official linux-source-6.6) and thus I cannot load compressed modules without user space helpers that probably not exist in initrd busybox version. Of
course I can load compressed modules once the pivot_root/switch_root is done.
A second bug is that the initrd does not seems to be compressed while
config says it should be with zstd (and the CONFIG_RD_* is ok). I can
change to xz.
Additional note : enabling this compilation flags, cause the signature[...]
of external modules to be incorrect as XZ with this flag *must* be used
with CRC32 checksum and not the xz default CRC64. I had to add
--check=crc32 to my signature scripts for external modules.
On 16/03/2025 20:13, Ben Hutchings wrote:[...]
Does your initramfs image include the right version of modprobe?
Boot with "break=top" and run "modprobe --version" to check this.
It use wahever is put in. I did not make any chnage.
Additional note : enabling this compilation flags, cause the signature[...]
of external modules to be incorrect as XZ with this flag *must* be used with CRC32 checksum and not the xz default CRC64. I had to add --check=crc32 to my signature scripts for external modules.
When does this signature script run?
After I do a dkms. I do not want to put the signature key available
directly in the fs.
I built a kernel from Linux 6.6.80 using the cloud-amd64 configuration
from linux-config-6.6, and an initramfs using initramfs-tools 0.146.
Module loading worked OK, so I don't believe this is a general problem.
I do not use cloud config. Did you check if CONFIG_MODULE_DECOMPRESS=y
is set in this config? If yes then the bug goes untoticed as the kernel itself decompress the modules not the module loader.
kmod binaries are identical[...]
more generally, the modules that exist in the CPIO and the one in the[...]
rootfs are identical
here is my complete module config if it helps (note that I keep the DECOMPRESS so far).
grep CONFIG_MODULE /boot/config-6.6.83
CONFIG_MODULES_USE_ELF_RELA=y
CONFIG_MODULE_SIG_FORMAT=y
CONFIG_MODULES=y
# CONFIG_MODULE_DEBUG is not set
CONFIG_MODULE_FORCE_LOAD=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
# CONFIG_MODULE_UNLOAD_TAINT_TRACKING is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_MODULE_SIG=y
# CONFIG_MODULE_SIG_FORCE is not set
CONFIG_MODULE_SIG_ALL=y
# CONFIG_MODULE_SIG_SHA1 is not set
# CONFIG_MODULE_SIG_SHA224 is not set
CONFIG_MODULE_SIG_SHA256=y
# CONFIG_MODULE_SIG_SHA384 is not set
# CONFIG_MODULE_SIG_SHA512 is not set
CONFIG_MODULE_SIG_HASH="sha256"
# CONFIG_MODULE_COMPRESS_NONE is not set
# CONFIG_MODULE_COMPRESS_GZIP is not set
CONFIG_MODULE_COMPRESS_XZ=y
# CONFIG_MODULE_COMPRESS_ZSTD is not set
CONFIG_MODULE_DECOMPRESS=y
# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set CONFIG_MODULES_TREE_LOOKUP=y
CONFIG_MODULE_SIG_KEY="certs/signing_key.pem"
# CONFIG_MODULE_SIG_KEY_TYPE_RSA is not set CONFIG_MODULE_SIG_KEY_TYPE_ECDSA=y
On 25/03/2025 01:12, Ben Hutchings wrote:
Hi Eric,
- The *complete* kernel config that you were using (before enabling CONFIG_MODULE_DECOMPRESS).
I switched tp 6.12.20 but same problem. Config attached.
- All the error messages from the initramfs when using this kernel and initramfs-tools 0.146. (A photograph of the screen is fine, if it's readable.)
Photo attached
No module loaded at all.
I think the bug #1099801 Marco d'Itri <md@Linux.IT> closed is a
dupplicate from mine that must also be closed I guess.
On 30/04/2025 03:19, Ben Hutchings wrote:
On Fri, 2025-04-25 at 19:38 +0200, Eric Valette wrote:
[...]
I think the bug #1099801 Marco d'Itri <md@Linux.IT> closed is a dupplicate from mine that must also be closed I guess.
Do you mean that the new version of kmod fixes this for you?
If you read the changelog for #1099801 it was obvious that kmod was
unable to decompress modules as required shared lib used by dlopen was missing and kernel was unable to do the job itself. This is exactly the
root cause of my problem and BTW if you read the comment I made in the
bug I suggested something like that.
Did the effort to validate the fix on my faulty computer by removing the MODULES_DECOMPRESS option again (as it was not set originally) and yes
this time it boots.
So this bug can indeed be closed but it was truly due to the change in initramfs-tool that was not tested with the old 6.1 config that was set
by linux-source-6.1
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 481 |
Nodes: | 16 (3 / 13) |
Uptime: | 17:59:38 |
Calls: | 9,542 |
Calls today: | 2 |
Files: | 13,653 |
Messages: | 6,139,890 |