CentOS4 and older megaraid - SOLVED?

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



Craig White wrote:
> you don't install in 'linux rescue' mode...that's what you have to do
> when you install the wrong module and have to fix things.
> 
> Follow the instructions on the web page - but see my notes previously in
> thread. CentOS makes it a bit more difficult because it needs the
> megaraid.ko built with i586 kernel but when the 'megaraid.ko' you copy
> into /lib/modules/2.6.9-11.EL[smp]/kernel/drivers/scsi/megaraid has to
> be built with the 686/smp version and not the 586 version or it won't
> work.
> 
> This of course has nothing to do with linux rescue mode

When following your instructions very closely, the user is prompted to 
attempt to install in 'linux rescue' mode in order to have the ability 
to use Alt+F2 to switch to a shell.  :)  As I noted early in this 
discovery, the normal linux installer does not allow this switch.  In 
the time between my query and your reply, I found that 'linux dd' also 
allows you to switch to a shell with Alt+F2, as well, so I have expanded 
on your documentation as follows (I am still testing this process, so it 
should not be considered 'working' until my tests are complete).  I 
included some spelling corrections and some "for dummies" instructions 
to help a broader user-base:

#####
## HowTo:  Install CentOS 4.0 with legacy MegaRAID controllers.
## Authors:
##   Tom Sightler
##   Craig White
##   William Kimball, Jr.
#####

#####
## ALERT:  Unless you follow tips below, this procedure works only for
## single-CPU machines.
#####

#####
## ALERT:  You will need two seperate floppy disks that are okay to
## format.  Label the first as, "megaraid i586" and the second as,
## "megaraid i686"
#####

rpm -e --allmatches kernel-devel
yum -y install kernel-devel-2.6.9-11.EL.i586
mkdir /usr/src/software
cd /usr/src/software
wget http://www.tuxyturvy.com/files/megaraid.tar.bz2
mkdir /usr/src/megaraid
cd /usr/src/megaraid
tar jxvfp /usr/src/software/megaraid.tar.bz2

#####
## There will be a lot of warnings at this next step.  They are
## harmless; ignore them.
#####
make -C /lib/modules/2.6.9-11.EL/build SUBDIRS=/usr/src/megaraid modules

#####
## Insert the floppy labeled, "megaraid i586".
#####
fdformat -n /dev/fd0u1440
mkfs -t ext2 /dev/fd0u1440
mount /dev/fd0u1440 /media/floppy
rm -rf /media/floppy/*
cp megaraid.ko /media/floppy/
umount /media/floppy

#####
## Wait for the drive light to turn off, then remove the floppy
## and be sure it is labeled, "megaraid i586"
#####

#####
## Uninstall the i586 kernel-devel package and replace it with the i686
## version.
#####
rpm -e --allmatches kernel-devel
yum -y install kernel-devel

cd /usr/src/
mv /usr/src/megaraid /usr/src/megaraid-i586
mkdir /usr/src/megaraid
cd /usr/src/megaraid
tar jxvfp /usr/src/software/megaraid.tar.bz2

#####
## There will be a lot of warnings at this next step.  They are
## harmless; ignore them.
#####
make -C /lib/modules/2.6.9-11.EL/build SUBDIRS=/usr/src/megaraid modules

#####
## Insert the floppy labeled, "megaraid i686".
#####
fdformat -n /dev/fd0u1440
mkfs -t ext2 /dev/fd0u1440
mount /dev/fd0u1440 /media/floppy
rm -rf /media/floppy/*
cp megaraid.ko /media/floppy/
umount /media/floppy

#####
## Wait for the drive light to turn off, then remove the floppy and be
## sure it is labeled, "megaraid i686"
#####

#####
## Quoted from Craig White at:
## http://lists.centos.org/pipermail/centos/2005-August/010021.html
#####
"
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  ;-)
"

#####
## Insert disk 1 of the CentOS 4 install set into your machine and
## reboot it.  At the CentOS 4 install prompt, insert the "megaraid
## i586" disk into the machine and type:
#####
 > linux dd

#####
## When asked whether you have a driver disk, answer No
## The probe will find the MegaRAID controller and Adaptec SCSI devices,
## but you will get Warning:  No hard drives have been found.
## This is normal.  Answer Yes, that you'd like to select drivers now.
## Tap Alt+F2 to get to a command prompt, ensure the "megaraid i586"
## disk is loaded and run:
#####
rmmod megaraid_mbox
rmmod megaraid_mm
mkdir /mnt/floppy
mount /dev/fd0 /mnt/floppy
insmod /mnt/floppy/megaraid.ko
lsmod

#####
## Make sure you see megaraid in the lsmod output.
## To confirm that the driver loaded, tap Alt+F4 and look toward the
## bottom for SCSI entries.  Tap Alt+F1 to return to the driver
## selection screen.  It will still show the wrong driver, but ignore
## this.  Click 'Done' to proceed.  Anaconda will start up and you are
## free to install whatever packages you deem necessary.
#####

#####
## ALERT:  DO NOT CLICK [REBOOT] WHEN ALL PACKAGES ARE INSTALLED!
## Instead, remove the last installer CD-ROM and tap Ctrl+Alt+F2 to
## return to the command prompt and run:
#####
umount /mnt/floppy

#####
## Insert the "megaraid i686" disk into the machine and type:
#####
mount /dev/fd0 /mnt/floppy
cp /mnt/floppy/megaraid.ko /lib/modules/2.6.9-11.EL/kernel/drivers/scsi
umount /mnt/floppy

#####
## Wait for the drive light to turn off, then remove the floppy and
## proceed by following the remainder of Tom Sightler's instructions,
## starting near the bottom of
## 
http://www.tuxyturvy.com/blog/index.php?/archives/4-Installing-RHEL4-on-Systems-with-Legacy-Megaraid-Drivers.html
## at:
## "3. Type 'chroot /mnt/sysimage' to set your root to your newly
## installed system image"
#####

#####
## For convenience, those remaining instructions are:
#####
"
3. Type 'chroot /mnt/sysimage' to set your root to your newly installed 
system image
4. Type 'vi /etc/modules.conf' and make sure that the line with 'alias 
scsi_hostadapter' says 'alias scsi_hostadapter megaraid'. Save the file
5. Switch to the /boot directory 'cd /boot'
6. Create new initrd file 'mkinitrd initrd-2.6.9-11.EL.img.megaraid 
2.6.9-11.EL'
7. Copy the new initrd over old initrd 'cp 
initrd-2.6.9-11.EL.img.megaraid initrd-2.6.9-EL.img'
8. Exit chroot environment by typing exit
9. Switch back to the GUI installer with Alt-F7 and press Finish

After these steps your system should be able to boot up a UP kernel. If 
your installing on an SMP section you'll need to boot up the UP system, 
compile the source driver again for the SMP kernel, install the module, 
recreate the initrd for the SMP kernel, and reboot again.
"


-- 
William Kimball, Jr.
http://www.kimballstuff.com/
"Programming is an art-form that fights back!" (Unknown)


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux