Bug#355580: initramfs-tools: fails to load required modules, boot fails
Package: initramfs-tools
Version: 0.53
Severity: important
Tags: patch
Three problems: no installation of module; no loading of "linear" module in md; using mdrun in scripts/local-top/md give incorrect md modules.
The hook function "manual_add_modules" uses modprobe to find the actual module to load. Unfortunately, possibly due to an error in modprobe, this leads to modules not being loaded.
My RAID1 and LINEAR-based system had the following line in /etc/modprobe.d/md:
install md_mod /sbin/modprobe sata_promise; /sbin/modprobe --ignore-install md_mod
When I run
# modprobe --set-version=2.6.15-1-k7 --show-depends md_mod
I get the result
install /sbin/modprobe sata_promise; /sbin/modprobe --ignore-install md_mod
but *no* insmod. Therefore, when this is run during mkinitramfs, the module md_mod is not installed. I realize that although modprobe documentation leads one to believe that there will be an insmod line printed, in fact there is not such line printed.
The patch: add "--ignore-install" to the modprobe line in manual_add_modules:
modprobe --ignore-install --set-version="${version}" --show-depends "${1}"
this produces a line with "inmod".
The next problem wtih initramfs-tools is for md specifically. First of all, some mischevious person has renamed the "md" module to "md-mod". This means the distribution hook hooks/md is out of date, because it attempts to load md. Secondly, that script also failes to load "linear".
Current fragment:
for x in md raid0 raid1 raid5 raid6; do
manual_add_modules ${x}
done
New fragment:
for x in md_mod linear raid0 raid1 raid5 raid6; do
manual_add_modules ${x}
done
Now, as for scripts/local-top/md, I have found that "mdrun" attempts to start /dev/md/0, even though there is no such device on my system. I have /1, /2, and /3, but not /0. I have not been able to debug mdrun.
Instead of using mdrun, I use the following:
In scripts/local-top/md:
mkdir /dev/md # --auto requires this directory pre-exist
/sbin/mdadm --assemble --scan --auto=md --config=/etc/mdadm/mdadm.conf
And in hooks/md I add the line:
cp /etc/mdadm/mdadm.conf ${DESTDIR}/etc/mdadm/mdadm.conf
This has the added advantage that *only* the devices that are actually needed are created in /dev/md, instead of dozens of devices that aren't used. udev automatically creates the link between /dev/mdN and /dev/md/N.
Please feel free to write for clarifications or further tests.
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (990, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-k7
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages initramfs-tools depends on:
ii busybox 1:1.01-4 Tiny utilities for small and embed
ii cpio 2.6-10 GNU cpio -- a program to manage ar
ii klibc-utils 1.2.2-3 small statically-linked utilities
ii udev 0.086-1 /dev/ and hotplug management daemo
initramfs-tools recommends no packages.
-- no debconf information
Reply to: