Add new cciss driver module to initrd.img ,stage2.img
Hi All ,
I am trying to install RHEL4 update 4 (kernel-2.6.9-5.EL) on HP Prolaint DL380 G5 .
while installing its not detecting the Hard Drive
DL380 G5 having HP Smart Array P400 controller and RHEL4 update 4 dos not contain this driver.
then i downloaded HP Smart Array driver "cpq_cciss-2.6.18-5.rhel4.i686.dd"
form HP site
during installation i have provied the driver disk at boot prompt
boot : linux dd
using this driver disk i have successfully install RHEL4 update 4 on DL380 G5
its working fine .
now i am tring to insert cciss.ko driver module on initrd.img so that i can install RHEL4 on DL380 G5 with out providing the driver disk , means it will take the driver automatically .
I followed the following steps :
A ) extract the "cpq_cciss-2.6.18-5.rhel4.i686.dd.gz"
mount -o loop cpq_cciss-2.6.18-5.rhel4.i686.dd /mnt/scsi
cp /mnt/* /drivers
gunzip -S .cgz modules.cgz
cpio -ivd < modules
so /drivers contains the following files.
2.6.9-6.EL ( directory contains the cciss.ko driver module for HP Smart Array P400 controler)
B ) Insert cciss.ko into initrd.img and edit module-info , modules.dep , modules.pcimap , pcitable
# get the initial ramdisk image out of the RHEL4 update disk CD1
#extract the RHEL4 iso file into /CD1
cp /CD1/isolinux/initrd.img /image
gzip -dc initrd.img > initrd.data # decompress it
# mount the ramdisk so you can access it's contents.
mount -o loop initrd.data /mnt/temp
# so we have a working copy of the compressed modules.
cp /mnt/temp/modules/modules.cgz /image
# extract the modules, which hide in a compressed cpio
gzip -dc modules.cgz > modules.cpio
# extract the modules in the ramdisk
cpio -idv < modules.cpio
# Put the HP Smart Array P400 module cciss.ko in with
the other modules. The source of your driver will vary depending on where
you get it from as mentioned earlier, but it should be in a proper kernel version
folder in the cciss driver download.
cp -p /drivers/2.6.9-5.EL/cciss.ko /image/2.6.9-5.EL/i686/
find 2.6.9-5.EL/ -depth -print | cpio -ov -H crc > modules.cpio # compress it in .cpio
gzip -c9 modules.cpio > modules.cgz # and compress it .cgz
cp -p modules.cgz /mnt/temp/modules # Put your compressed modules back in the image.
vim /mnt/temp/modules/module-info # edit the entry for the cciss to be for cciss and a text description.
"Update HP CCISS driver"
vim /mnt/temp/modules/pcitable # from the editor add the following and save:
0x103c 0x3220 "cciss" "CPQ|SAP6xx"
0x103c 0x3223 "cciss" "CPQ|SAP8xx"
0x103c 0x3230 "cciss" "CPQ|SAP4xx"
0x103c 0x3233 "cciss" "CPQ|SAE5xx"
0x103c 0x3238 "cciss" "CPQ|SAE2xx"
vim /mnt/temp/modules/modules.pcimap # from the editor add the following and save:
# pci module vendor device subvendor subdevice class class_mask driver_data
cciss 0x00000e11 0x0000b060 0xffffffff 0xffffffff 0x00000000 0x00000000 0x00000001
cciss 0x00000e11 0x0000b178 0xffffffff 0xffffffff 0x00000000 0x00000000 0x00000001
cciss 0x00000e11 0x00000046 0xffffffff 0xffffffff 0x00000000 0x00000000 0x00000001
vim /mnt/temp/modules/pci.ids # from the editor add the following line
0x103c Hewlett Packard Company
3223 Smart Array P800 Controller
3230 Smart Array P400 Controller
3233 Smart Array E500 Controller
3238 Smart Array E200 Controller
umount /mnt/temp # unmount the initrd.data now that you're done with it.
gzip -c9 initrd.data > initrd.img # compress the ramdisk back into image format.
cp -p initrd.img /CD1/isolinux/ # copy the modified ramdisk image back onto your rhel4 source disk 1.
#Create the ISO Image
mkisofs -R -J -T -no-emul-boot -boot-load-size 4 -boot-info-table -V "RHEL4-ES-U4-Disk1" -b isolinux/isolinux.bin -c isolinux/boot.cat -o RHEL4-ES-U4-Disk1.iso CD1
Now i have RHEL4-update4 disk which contains the HP Smart Array P400 controller driver module .
using this RHEL4-ES-U4-Disk1 i tried to devloyed on DL380 G5 .
while installing its detecting the Hard Drive and i am able to install linux successfully .
But the problem i am facing is that :
when i reboot the system after reboot its not loading the linux OS
the error messege i am getting
Red Hat nash version 4.1.18 starting
mkrootdev: label / not found
mount : error 2 mounting ext2
mount : error 2 mounting none
switchroot : mount faild 22
umount /initrd/dev faild 2
kernel panic not syncing
#Then i updated the in /CD1/RedHat/base/stage2.img
mount -o loop stage2.img /mnt/stage
tar -cvf /image/stage2.tar .
tar -xvf /image/stage2.tar
cp -a /mnt/temp/modules/* /image/stage-work/modules/
mkcramfs stage-work/ stage2.img
cp stage2.img /CD1/RedHat/base/
Again i recreate the ISO and tried to install But i am getting the same error
Any help will be apreciated
Try to boot the computer into a rescue mode, do a ch root which should load your file system, and then make a new initrd, with your modules within it.
There's a link, should help you... if not I'll post back in a few days. I'm trying a similar issue at work with an SCSI Controller.
Best of luck!!
I'm trying having a similar issue. I've been successful adding a driver for a SATA RAID card to the initrd.img file that the CD boots to. The installation process detects the drive array and installs the OS successfully. When trying to boot the machine though it fails with the same error posted above. Can anyone tell me what file or files on the CD need to be updated so that the installed OS will boot successfully. Any help is apprecated!
Okay, at work on Friday, I fixed the problem... really easy actually.
Use your linux CD (with the modified initrd.img) to load into a rescue mode. (Generally all you have to do is type "linux rescue" at the prompt)
After everything loads, load your file system with chroot (for me I think it was "$ chroot /mnt/sysimage" or something to that effect. Add your modules into the /lib/modules/(kernelversion)/drivers/scsi/ folder, and edit module.dep in /lib/modules/(kernelversion)/ and then make a new initrd.
# mkinitrd -fv /boot/initrd-2.4.21-27.img 2.4.21-27
then change your boot loader to point at that initrd, so it loads... and you're done!
Also, to add the modules into your file system through rescue mode, you may have to boot a liveCD and do a "sudo cp" onto your HDD, unless you have other ways to get them on.
Hope this works :-)
If I understand your process correctly, that will only take care of the drivers on the system just installed right? That doesn't fix the problem of having to do that to future machines that are installed from the same disk?
I'm looking for a solution that allows me to install everything my server requires, drivers, rpm's, basically the entire machine, start to finish without user intervention. Kickstart does that for the all the packages, configurations, and additional rpm's I choose to install and then in the %post section I can run any other scripts necessary to complete the process. So that only leaves the drivers. I know you can build them into the initrd.img file. I've been successful at that. It just doesn't propagate down to the installation. There should be another file on the CD I can put the driver images into and have to work, but I don't know what that file is. I'll keep digging around and post back if I come up with anything.
Thanks for the information provided,
|All times are GMT -5. The time now is 04:41 PM.|