#1099456 initramfs-tools: misleading error messages

Package:
initramfs-tools
Source:
initramfs-tools
Submitter:
Chris Hofstaedtler
Date:
2025-07-09 12:55:01 UTC
Severity:
normal
Tags:
#1099456#5
Date:
2025-03-03 18:58:06 UTC
From:
To:
Dear initramfs-tools Maintainers,

while investigating Grml Live build (*) failures, I came across these
error messages:

Setting up linux-image-6.12.17-arm64 (6.12.17-1) ...
I: /vmlinuz.old is now a symlink to boot/vmlinuz-6.12.17-arm64
I: /initrd.img.old is now a symlink to boot/initrd.img-6.12.17-arm64
I: /vmlinuz is now a symlink to boot/vmlinuz-6.12.17-arm64
I: /initrd.img is now a symlink to boot/initrd.img-6.12.17-arm64
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.12.17-arm64
/usr/sbin/mkinitramfs: 122: cannot open /sys/module/firmware_class/parameters/path: No such file
/usr/sbin/mkinitramfs: 122: cannot open /sys/module/firmware_class/parameters/path: No such file
/usr/share/initramfs-tools/hooks/live: 122: cannot open /sys/module/firmware_class/parameters/path: No such file
/usr/share/initramfs-tools/hooks/cryptroot: 615: cannot open /proc/mounts: No such file
cryptsetup: WARNING: Couldn't determine root device
sed: can't read /proc/cmdline: No such file or directory
grep: /proc/swaps: No such file or directory
/usr/share/initramfs-tools/hooks/cryptroot: 615: cannot open /proc/mounts: No such file
grep: /proc/cpuinfo: No such file or directory

Especially the lines marked "mkinitramfs: 122" seem to make no
sense, as /usr/sbin/mkinitramfs line 122 does not seem to deal with
/sys/module/firmware_class/parameters/path at all.

It would be nice if this could be improved.

Chris


(*) these builds run containerized and thus do not have /sys or
/proc. This configuration may be unusual, but works fine in
practice, or least did until initramfs-tools 0.146.
It has the advantage of not leaking system state from the build host
into a live image (and others).

#1099456#10
Date:
2025-06-27 11:43:39 UTC
From:
To:
/sys/module/firmware_class/parameters/path: No such file
/sys/module/firmware_class/parameters/path: No such file
/sys/module/firmware_class/parameters/path: No such file
/proc/mounts: No such file
/proc/mounts: No such file

This error message and line number comes from the shell. The issue here
is that the error comes from a file that was sourced. So the line number
122 refers to the sourced file. Searching the source code points to
/usr/share/initramfs-tools/hook-functions.

The cryptroot:615 comes from get_mnt_devno() from
/lib/cryptsetup/functions.

So this bug should probably re-assigned to dash/bash/etc.

#1099456#15
Date:
2025-07-09 12:52:36 UTC
From:
To:
On Mon, 3 Mar 2025 19:58:06 +0100 Chris Hofstaedtler <zeha@debian.org> wrote:
[...]

initramfs-tools is not (currently) designed for that, sorry.

Ben.