Bug#678262: mdadm: fails to honour INITRDSTART='none' in /etc/default/mdadm

Andreas Henriksson andreas at fatal.se
Sun Aug 19 12:39:08 UTC 2012


Hello!

Talked the other day with mjt on irc about mdadm problems I was
having that seems very much like this issue.
We debugged it and mjt found some issues... He probably knows
much more then what I'm about to write here...


[...]
>> The initramfs panic'ed from the script in 
>> /usr/share/initramfs-tools/scripts/local-top/mdadm.
> Can you please provide more information about this panic? A picture
> would be most helpful. I can’t reproduce it on my system.

Providing some additional information as requested.

I'm in the same situation with INITRDSTART='none' and think
that mdadm shouldn't have to mess with the initramfs at all
in this case, but that part is IMHO only "wishlist".

The grave part here is the unbootable system that can happen
in some cases.
For me, when I modify the grub cmdline and add "init=foobar" (which
seems completely irrelevant since the initramfs scripts break
down before getting close to starting init) then the bootup
"panics".
Note that this is not a kernel panic! It is a panic function within
the initramfs scripts that get called. You can find it in
/usr/share/initramfs-tools/scripts/functions

The reason this happens (for me atleast) is that /proc/mdstat is not
found. This is because md-mod kernel module has not been loaded!
(NO idea why it's being loaded when I don't provide "init=foobar" !!!)

The reason it's not loaded is because the variable MD_MODULES
generated by the mdadm hooks to load raid level modules (and pull in
md-mod) is EMPTY.

The reason it's empty is apparently that it depends on the ARRAY
definition in the initramfs /etc/mdadm/mdadm.conf, which in turn
is received from "mdadm --detail --brief /dev/md0" no longer
includes the LEVEL information.....


(On a related note, the panic script function looks for a "panic=X" cmdline
argument and tries to reboot after X seconds of showing the panic message
instead of giving a rescue shell.... THIS IS BROKEN.
The reboot command in initramfs does nothing! Everybody gets rescue
shell access!)

-- 
Andreas Henriksson



More information about the pkg-mdadm-devel mailing list