RE: Autodetection howto

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

 



> > 2. If you have raid compiled as modules, you need a proper initrd
> >    which will load appropriate modules (raid5) and then re-autodetect
> >    the arrays (SuSE uses 'raidautorun' for that) - all that before
> >    your OS actually starts booting.

> I'm not exactly sure how to do this... could you give me an example?  
> My existing initrd is /boot/initrd-2.4.22-1.2140.nptl_30.rhfc1.at.img so
> I'm attempting:
> 
> # mkinitrd --preload raid5.o
> /boot/initrd-2.4.22-1.2140.nptl_30.rhfc1.at.img 2.4.22-1
> 
> I'm getting a usage error and I'm evidently not understanding mkinitrd's
> man page.

mkinitrd is pretty much distribution specific, so I cannot help you much
with that.

However, according to man page on Redhat 7.2 AXP that I have access to,
the 'mkinitrd' script is supposed to add raid modules automatically if the
system's root partition is on raid (I suppose it checks the /etc/fstab and 
/etc/raidtab files)...

Maybe you should check the content of your initrd by:

1. cp /boot/initrd-2.4.22-1.2140.nptl_30.rhfc1.at.img /tmp/myinitrd.gz
2. gunzip /tmp/myinitrd.gz
3. mkdir /tmp/loop
4. mount -o loop /tmp/myinitrd /tmp/loop
5. cd /tmp/loop

Here you will see a 'linuxrc' script, which lists all the commands that 
are executed.

This is my 'linuxrc':

#!/bin/nash

echo "Loading jbd module"
insmod /lib/jbd.o
echo "Loading ext3 module"
insmod /lib/ext3.o
mount -t proc /proc /proc
echo Mounting /proc filesystem
echo Creating root device
mkrootdev /dev/root
echo 0x0100 > /proc/sys/kernel/real-root-dev
umount /proc
echo Mounting root filesystem
mount --ro -t ext3 /dev/root /sysroot
pivot_root /sysroot /sysroot/initrd

As you can see, I don't use root on raid on this particular machine.

  D.


-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux