https://qa.mandrakesoft.com/show_bug.cgi?id=864
Product: mkinitrd
Component: mkinitrd
Summary: mkinitrd doesn't start RAID when using --with to load
RAID modules (patch included)
Version: 3.1.6-34mdk
Platform: PC
OS/Version: All
Status: UNCONFIRMED
Severity: normal
Priority: P2
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
What: If you are using mkinitrd to create a RAID enabled initrd.img on a PC
without RAID it fails to add the "raidautostart /dev/md0" into the linuxrc
script, resulting in the kernel failing to start due to the RAID'ed root
device not being available.
Why: The variable $startraid is only set in mkinitrd if it detects a RAID
array in /etc/raidtab, it is not done if you load a raid module by hand (for
instance with --with=raid1).
Reproduce: On a system without RAID do:
/sbin/mkinitrd -v --with=raid1 initrd.img [kernel-version]
There will be no "raidautostart /dev/md0" in the linuxrc shown, even though
the raid1 module will be loaded. Now try:
startraid=1 /sbin/mkinitrd -v --with=raid1 initrd.img [kernel-version]
You will see that there is a "raidautostart /dev/md0" now in linuxrc.
FIX: Set startraid=1 when --with is used to specify a RAID module.
Patch: This patch is my attempt at a fix, it patches the findmodule() function
to set startraid=1 if one of the raid[0-5] or linear modules are asked to be
loaded.
--- mkinitrd.orig 2003-01-18 08:51:42.000000000 +1100
+++ mkinitrd 2003-01-18 08:52:27.000000000 +1100
@@ -66,6 +66,10 @@
modName=$(echo $modName | cut -b2-)
fi
+ if echo $modName | egrep '^raid[0-5]$|^linear$' >/dev/null 2>&1; then
+ startraid=1;
+ fi
+
if [ "$modName" = "i2o_block" ]; then
findmodule i2o_pci
findmodule i2o_core
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.