If you happen to change out your SCSI controller, or migrate from IDE to SCSI, you will need to make a few adjustments. You can make these adjustments either before or after you swap controllers. This document will discuss making the adjustments after you have changed the hardware and the system is not booting.
A short list of the changes that need to be made is listed here:
/etc/modules.conf
mkinitrd
/etc/fstab
/boot/grub/grub.conf (or /etc/lilo.conf)
In one example we had a drive that was running on a 5i controller, which uses the cciss.o driver. We moved this drive to a storage cabinet which was connected to a SA5300, which uses the ida.o driver. Our system wouldn't boot on the storage cabinet as it would complain that it couldn't find init.
So we booted the box on the Red Hat 7.2 installation CD-Rom and typed "linux rescue" at the boot prompt. After okaying our way through we were finally dropped at a command prompt. The "rescue" mode of the RH72 install CD was smart enough to locate our drives and mount them under /mnt/sysimage.
So to begin working on our drive to correct the boot problems, we chrooted to it ( /mnt/sysimage/usr/sbin/chroot /mnt/sysimage ) and then ran "su -" to get our pathing and environemnt straightened out -- now we are what is very similar to Single User Mode.
chroot
su -
Now we modified /etc/modules.conf to use the correct driver, made a new initrd, changed the entries in /etc/fstab, and edited /boot/grub/grub.conf:
/etc/modules.conf
alias scsi_hostadapter ida
alias scsi_hostadapter2 cciss
Help can be found here:
lsmod can show you which drivers are currently loaded if you need help.
mkinitrd -f /boot/initrd-2.4.7-10.img 2.4.7-10
Help can be found here:
Look in /boot and /boot/grub/grub.conf for valid filenames to use for your new initrd -- or create a new filename for it - be sure to tell grub.conf if you create a new filename. Also look in /lib/modules for valid kernel versions to use as part of the mkinitrd command.
Help can be found here:
When updating fstab and grub, you may get some help by looking at /proc/partitions. It will tell you which device names are currently valid.
changed any entries in /etc/fstab from the old format (/dev/cciss/c0d0p3) to the new format (/dev/ida/c0d0p3).
changed any specific calls in /boot/grub/grub.conf to the new format.
Now finish up with 3 exits to back us out of the system and have the installer reboot us:
exit (exiting from "su -")
exit (exiting from "chroot")
exit (exiting from "rescue shell")
Now the system should unmount the hard drive, eject the cdrom, and reboot.
In our test case the system then booted on the new SCSI controller.
Search this Site!: