> dan1 spake the following on 2/20/2007 11:00 AM: >> Hello everyone. >> >> I am looking for a way to move a CentOS 4 installed production hard disk >> to another system (which has another hardware). >> The first has an nvidia sata controller (sata_nv), but the second has a >> via sata (sata_via). >> For all the rest of the hardware it can upgrade well I know, but if the >> sata driver is different, then the system doesn't boot because the >> proper driver is not included in the initrd file (grub still boots OK). >> >> Here is the error message: >> Uncompressing Linux... Ok, booting the kernel. >> Red Hat nash version 4.2.1.8 starting >> mount: error 6 mounting ext3 >> mount: error 2 mounting none >> switchroot: mount failed: 22 >> Kernel panic - not syncing: Attempted to kill init! >> >> Does anyone know how I could upgrade easily this initrd file to contain >> the proper driver, and even from another partition? >> Would it be possible to keep an old config-xx file and do an rpm upgrade >> which would automatically recompile a proper initrd-xx file for that new >> system? >> >> Thanks for any help. >> Daniel > You could boot from a rescue disk, chroot to /mnt/sysimage, make sure that > the > proper driver shows in an lsmod, and re-install the current kernel rpm. > That > should redo the initrd. Somewhat easier than remembering the proper initrd > commands. > Hello, Scott. Thanks for the suggestion. I have tried what you said. This didn't work. It did compile the new kernel, but has taken the other module, not the correct one for the new system. Maybe it did take the module from the old config file that it has found? The /proc/modules directory was empty when chrooted, so I don't know if the kernel installation could be done properly in such conditions, because the 'lsmod' when chroted was not able to open this directory to list the loaded modules. In any case, the initrd file of the new system (when working properly) is different than the one reinstalled on the chrooted partition to upgrade with the new module, and they should be the same. Would you know what to do now by still using your interesting method?