[CentOS] CentOS4 and older megaraid - SOLVED

Wed Aug 17 02:56:01 UTC 2005
Craig White <craigwhite at azapple.com>

On Tue, 2005-08-16 at 16:33 -0700, Ajay Sharma wrote:

> > ----
> > Solved
> > 
> > yum install kernel-devel didn't work because like a moron, I was in smp
> > kernel and so I needed to yum install kernel-smp-devel which then made
> > it all work but of course the boot cd is a uni-processor so I will have
> > to wait until I can reboot the production machine into a uni-processor
> > mode to compile a suitable module to test
> 
> 
> Please keep us posted on your progress.  I too am stuck at Centos 3 
> because of an old Megaraid controller.
> 
----
The Eagle has landed ! ! !

I have installed CentOS 4 on LSI Megaraid 467 (I believe what Dell would
call the Perc-2/DC - AND it has booted and is running.

Much thanks to Tom Sightler for his excellent blog. I have included a
copy of this in the event it helps him to adjust his blog. For
completeness, his blog is here...
http://www.tuxyturvy.com/blog/index.php?/archives/4-Installing-RHEL4-on-
Systems-with-Legacy-Megaraid-Drivers.html

Adjustments MUST be made to accomplish this on CentOS - the reason is
that CentOS permits 586 hardware and thus the installer reduces the
lowest common denominator and you have to use the 586 version of the
kernel to use anaconda but then you need the 686 version for first boot.
The file you copy to your installed base
in /lib/modules/2.6.9-11.EL/kernel/drivers/scsi/megaraid should be the
686 version, NOT the 586 version necessary for the anaconda installer.

Thus the way I got it done...

mkdir /usr/src/software
cd /usr/src/software
wget http://www.tuxyturvy.com/files/megaraid2.tar.bz2
yum install kernel-devel-2.6.9-11.EL.i586
mkdir /usr/src/megaraid
cd /usr/src/megaraid
tar jxvfp /usr/src/sofware/megaraid2.tar.bz2
make -C /lib/modules/2.6.9-11.EL/build SUBDIRS=/usr/src/megaraid modules

then copied megaraid.ko to a floppy and labeled it megaraid-586

then I cleaned out the kernel-devel...to make way for the 686 version
rpm -e kernel-devel
yum install kernel-devel

then cd ../
mv megaraid megaraid-586
mkdir megaraid
cd megaraid
tar jxvfp /usr/src/sofware/megaraid2.tar.bz2
make -C /lib/modules/2.6.9-11.EL/build SUBDIRS=/usr/src/megaraid modules

then copied megaraid.ko to a floppy and labeled it megaraid-686

You could probably repeat for smp kernel if you have multiple processors
now...you should be getting the pattern except that you can have kernel-
devel and kernel-smp-devel installed at the same time. You cannot have
kernel-devel for both 586 and 686 'uni-processor' both installed at the
same time.

Anyway, the 586 is used during installs or 'linux rescue' efforts when
you screw up ;-)

I found that when I booted into linux rescue, I could switch consoles..
Alt-F2

rmmod megaraid_mbox
rmmod megaraid_mm
mkdir /mnt/floppy
mount /dev/fdo /mnt/floppy
insmod /mnt/floppy/megaraid.ko

and be working... this process may be easier than 'noprobe' option
passed at boot

Craig