On Sat, 2005-08-20 at 15:02 -0600, William wrote:
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. :)
---- those aren't my instructions - 'linux resuce' is a mode of anaconda that has nothing to do with installing. ----
As I noted early in this discovery, the normal linux installer does not allow this switch.
---- sure it does - after you complete (or skip) the verify media process, if all you have is the RAID disks, system will stop and report that it was unable to find a suitable disk for installation and ask if you want to install any modules (this is the virtual equivalent of passing a 'linux dd' at boot). At that point, you can switch to a working command prompt (<Alt><F2>) ----
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
---- it is unnecessary - do NOT install any of the megaraid modules prsented by the 'Add module' but you can (I think - untested) insert the floppy disk with the proper megaraid.ko at this point (it has to be the one created with the 586 kernel-devel).
I found that it was incredibly simple to boot normally, skip the media test (you MUST have good media) - get to the next screen where it complains about not finding a suitable disk to install upon, to switch to the <Alt><F2> console and... (if you didn't noprobe at boot) rmmod megaraid_mbox rmmod megaraid_mm (whether you booted with noprobe parameter passed at boot or not, continue on) mkdir /mnt/floppy mount /dev/fd0 /mnt/floppy insmod /mnt/floppy/megaraid.ko #this has to be created with 586-kernel- devel then once you have verified that the module is loaded and the disks have been found <Alt><F4> - you can continue on with the install process <Alt><F1> this ain't that hard
the web link at tuxyturvy.com was nearly perfect for RHEL 4 (megaraid.ko should actually be copied to /lib/modules/2.6.9-11EL/kernel/drivers/scsi/megaraid)
the web link at tuxyturvy.com needed additional adjustments for CentOS 4.1:
1 - megaraid.ko at boot time on CD had to be built with kernel- devel-2.6.9-11EL.i586
2 - megaraid.ko copied into /lib/modules/2.6.9-11EL/kernel/drivers/scsi/megaraid had to be built with kernel-devel-2.6.9-11EL.i686
3 - you cannot have both kernel-devel installed on the same computer at the same time. Install one, build the megaraid.ko, copy it to a floppy and then rpm -e kernel-devel and then install the other and build the module, copy it to another floppy. If you have an smp system, you will have to do this a third time (for the smp kernel) but by then, you should have figured out how to get it done.
Again - linux rescue mode parameter passed at boot is only for trying to fix what you did wrong AFTER you have installed CentOS 4.1 and couldn't boot from the RAID array (you will get a kernel panic)
Craig ----
, 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-Syst... ## 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. "