[CentOS] Help with a good recovery plan.. Linux rescue?

Tue Jan 20 05:40:32 UTC 2009
Joseph L. Casale <JCasale at activenetwerx.com>

>Can I use 'linux rescue' to fix that OS up to boot it? The kernel 
>panics in its current state (because the hardware architecture is so 
>strikingly different). What is the methodology of fixing the kernel 
>in this circumstance?

You likely don't have block device modules for whatever controller this
new rig has in your initrd.

Deduce that in your rescue environment (look for something obvious), here
are some examples (IDE|SATA|SCSI):

# lspci
00:1f.2 IDE interface: Intel Corporation 82801H (ICH8 Family) 4 port SATA IDE Controller (rev 02)
00:1f.5 IDE interface: Intel Corporation 82801H (ICH8 Family) 2 port SATA IDE Controller (rev 02)
03:00.0 SATA controller: JMicron Technologies, Inc. JMicron 20360/20363 AHCI Controller (rev 03)
03:00.1 IDE interface: JMicron Technologies, Inc. JMicron 20360/20363 AHCI Controller (rev 03)

Figure out what module supports it. Maybe see where it resides in the modules/src tree?
# lsmod
ata_piix               22341  4
libata                143997  2 ahci,ata_piix
scsi_mod              134605  3 sg,libata,sd_mod
# locate scsi_mod
/lib/modules/2.6.18-92.1.18.el5/kernel/drivers/scsi/scsi_mod.ko
/usr/src/kernels/linux-2.6.28-rc6/drivers/scsi/scsi_module.c

Obviously scsi_mod is a scsi module (Block Device), and I am using it... 

Then either add them to your modprobe.conf which is read by mkinitrd or use cli options in your
mkinitrd command.
# cat /etc/modprobe.conf
alias eth0 e100
alias eth1 r8169
alias scsi_hostadapter ata_piix
alias scsi_hostadapter1 ahci

Generate this new initrd (man mkinitrd) and force the kernel you currently have *on the dead system*,
look in /boot.

Edit grub.conf to use this new initrd, make a new stanza maybe?

Edit your fstab to reflect any changes that might occur as a result, such as migrating from an IDE
block device to a SCSI one: /dev/had --> /dev/sda etc. unless of course you are using LVM on the system
disc as well.

I suspect (but you didn't provide much info) that since these very same discs are in the new machine,
they have a compatible interface which hasn't changed (obviously, they were SCSI or SATA etc) and your
new rig likely has newer devices which need newer modules maybe like if the system disc was IDE or SATA
on an old controller?

Could be something else, post back with any progress.

HTH,
jlc