[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#299103: initrd-tools: relies on devfs even for raid root



hello jesus rojo martinez,

thanks for your bug report brought me some nice ideas.
i hope that belows fix is clean.
afais it's quite neer to the fix proposed by eric.

my test box with raid1 root survived a reboot with the created
initrd.img for non-devfs kernels as of for devfs kernels.

On Fri, 11 Mar 2005, Jesús Rojo Martínez wrote:

> However, when I use mkinitrd from the initrd-tools, it fails to boot because it doesn't find the root partition,
> because mkinitrd uses devfs (and obviusly, I don't have devfs in the 2.6 kernel).
> 
> I send a patch that works fine for me (and it should work for everybody). The patch could be better, concretaly
> the part that detects other RAID partitions:
> 
>   - Don't copy /etc/mdadm/mdadm.conf, just generate it with some like:
> 
> 	echo "DEVICES partitions" > $INITRD/$MDADMCONF
> 	mdadm -D --scan >> $INITRD/$MDADMCONF
> 
>   - Moreover, with the information generated with those commands, read the devices needed for
>     "automatic" adition to the initrd (echoes them to >&4).

well that's a bit too much at initrd level, we just want to get
the root partition mounted pivot_root should be done later
by the responsability of some init script.
 
so the belows fix seems much straight forward:

--- mkinitrd    (revision 3110)
+++ mkinitrd    (working copy)
@@ -175,7 +175,8 @@
        )"
 
        printf '%s\n' $devices > getroot
-       echo mdadm -A /devfs/md/$minor -R -u $uuid $devices \
+       echo $device >&4
+       echo mdadm -A $device -R -u $uuid $devices \
                > md$minor-script
        echo /sbin/mdadm >&6
 }


also cc'ing all concerned bug reporter.
it would be great if you could test the initrd-tools
package version 0.1.80, it's from current svn
and contains aboves fix.
http://debian.stro.at/sarge/initrd-tools_0.1.80_all.deb

thanks for your feedback.  :)

--
maks




Reply to: