PDA

View Full Version : Installing and booting from an aacraid root drive



pedxing
01-21-2004, 03:04 AM
I want to install Knoppix to a Dell machine with an aacraid RAID 5 disk array (and no other hard drive). Knoppix works fine from the CD, so it has the proper driver. But when I do a hard drive install using knx-hdinstall, the drive is not being recognized on reboot. I'm guessing that is because the driver is a loadable module and needs to be put into the initrd image.

My question is, how do I go about doing this? Has someone hacked knx-hdinstall so that it can load arbitrary modules into initrd? Do I need to do it myself, manually? If so, what else do I need to do to get a working system?

Enquiring minds would be grateful to know. Thanks.

pedxing
01-21-2004, 08:45 PM
I got this working, so I thought I would post an FYI for anyone else who might want SCSI drivers other than the ones the script installs by default.

The knx-hdinstall script is smart about only loading those SCSI drivers that are necessary for your particular machine into the initrd file. The trouble is that the SCSI devices it works with are not the full range that Knoppix supports, but just those that are included in the miniroot. So my solution was to create my own modified miniroot with the device driver I needed, and change the knx-hdinstall script to use my miniroot. There may be easier fixes, but this worked for me.

Here is what I did from a root prompt:

1) cp /usr/local/bin/knx-hdinstall /tmp
2) mkdir /mnt/work
3) mount -t vfat -o loop,ro /cdrom/KNOPPIX/boot.img /mnt/work
4) gzip -cd /mnt/work/miniroot.gz > /tmp/miniroot
5) umount /mnt/work
6) mount -t ext2 -o loop /tmp/miniroot /mnt/work
7) cp /lib/modules/2.4.22-xfs/kernel/drivers/scsi/aacraid/aacraid.o /mnt/work/modules/scsi
(you'll want to substitute your own device driver here)
8) umount /mnt/work
9) Edit knx-hdinstall and change:

mount -t vfat -o loop,ro /cdrom/KNOPPIX/boot.img $TL1
gzip -cd $TL1/miniroot.gz > $TR/miniroot
umount $TL1

to:

cp /tmp/miniroot $TR

10) rmdir /mnt/work
11) /tmp/knx-hdinstall

That should do it. When working with your own driver, make sure you get any dependencies it may have. I'm no module guru but I think the simplest way is using lsmod. If you don't want to trust that you can use depmod -n > /tmp/modlist.txt and check over the file for your driver.

Hope that helps anyone in a similar situation.