I have three disks in my box. One 140GB IDE and two RAIDed 120GB SATA disks.
I have run gentoo for a long time now only on my IDE drive, not even used the RAID disks.
Since the RAID disks are so much faster than the single IDE one, I would like to install gentoo on them and throw away my slow disk.
This should be kind of easy I though. I'm using a RAID/SATA card from Highpoint and I have compiled the driver module from their site and that works. The module is called 'hpt374.ko'.
In my current configuration when i do a 'insmod hpt374.ko', it works like expected. I get some sda devices from it and I can mount them without problems.
When I knew that worked i begun to try get a bootable root on the RAID. First of all I partitioned the RAID into a boot, swap and root partition.
Since BIOS uses interrupt on SCSI (RAID) exactly the same way as it does on ordinary IDE it's no problems to get Grub use the boot partition on the RAID. The tricky part, for me anyway, is to get the Linux kernel to find it's way on the RAID. So the boot partition on the RAID is setup and working but if I try to go ahead and load the kernel I get 'Kernel panic: bla bla' because the RAID driver isn't loaded into kernel yet (since the kernel isn't loaded
As I see it, it's when making this initrd image i get problems. I have spent some days now googeling for information how to do this the right way, but there isn't much to go on and most of the information is outdated or unprecise. But I did find how to make and mount the initrd image and some information on what files and directorys that should be in it. Additional to this I want to include and load my 'hpt374.ko' module so that the rest of the kernel can be loaded later. And for the 'hpt374.ko' module I guess I need to have SCSI support and SCSI disk support (RAID=>SCSI). Therefore I need to load 'scsi_mod.ko' and 'sd_mod.ko'. And after that I need to get ext3-support so that I can mount the filesystem, for that I need to load 'jbd.ko' and 'ext3.ko'.
A made the initrd and put the files needed in it. The following is a list of files and directory that I have:
- .
./lib
./lib/scsi_mod.ko
./lib/sd_mod.ko
./lib/hpt374.ko
./lib/jbd.ko
./lib/ext3.ko
./bin
./bin/nash
./bin/insmod
./sbin
./sbin/bin
./sbin/modprobe
./etc
./dev
./dev/console
./dev/null
./dev/ram
./dev/systty
./dev/tty1
./dev/tty2
./dev/tty3
./dev/tty4
./loopfs
./proc
./sysroot
./linuxrc
This is my linuxrc script:
Code: Select all
echo "Loading scsi_mod module"
insmod /lib/scsi_mod.ko
echo "Loading sd_mod module"
insmod /lib/sd_mod.ko
echo "Loading RocketRAID module"
insmod /lib/hpt374.ko
echo "Loading jbd module"
insmod /lib/jbd.ko
echo "Loading ext3 module"
insmod /lib/ext3.ko
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/initrdNow I should boot this up. But before that I need to make changes in my grub.conf and tell grub to load the image.
This is my grub.conf:
Code: Select all
timeout 43
default 0
title GNU/Linux
root (hd0,0)
kernel /bzImage ro root=/dev/sda3 noapic
initrd /initrd.imgI get trough the bootloader alright and grub reads the initrd image and starts executing the linuxrc script. But already at 'insmod /lib/scsi_mod.ko' I get an error. The error output rushes over the screen very fast and it's hard to read what it's all about, but it's practically alot of hex code and stuff and in the end I get the message: ERROR: /bin/insmod exited abnormally!
But the boot continues and I get the same error at every other module except 'hpt374.ko' that, for some reason, seam to load correct and I can see that it gets the devices sda1, sda2 and sda3. And i can see that the total size of the disk is 240GB (and that's correct, it's two RAID 120GB disks). But still I got errors on the other modules so I get a kernel panic when root is going to mount.
So the question is. Why can't I insmod the other modules? This could maybe have something to do with the kernel version the modules are compiled for. But how could that be? They are all compiled for 2.6.11-gentoo-r6 and that's also the version I'm running. Please help me with this or give me other ways of doing this if they exists.
Sorry for the essay, but I wanted this to be useful for as many as possible because it's hard to find information on this.



