[CentOS] Not able to run kernel-xen with megasr module :/

Sat Apr 19 01:56:21 UTC 2008
Akemi Yagi <amyagi at gmail.com>

On Fri, Apr 18, 2008 at 5:28 PM, Tomasz Nowak <tnowak-p at netventure.pl> wrote:
> I've managed to install CentOS 5.1 on S5000PAL
>  with fakeraid Intel Embedded Raid Technology II
>  Raid1 (LSI chipset) with some help of kickstart
>  declaration 'driverdisk --source=http://.../driver.img'
>  Then I've had some problems with yum update - new kernel
>  didn't know about megasr.ko. I've solved it with commands:
>  cd /lib/modules/
>  cp 2.6.18-53.el5PAE/updates/megasr.ko 2.6.18-53.1.14.el5PAE/updates/
>  depmod -a 2.6.18-53.1.14.el5PAE
>  mkinitrd /boot/initrd-2.6.18-53.1.14.el5PAE-new.img 2.6.18-53.1.14.el5PAE
>  at last I've edited grub.conf add '-new' to initr definition.
>  I'm not sure why I need to do that twice, but it finally worked.:
>  # uname -r
>  2.6.18-53.1.14.el5PAE
>  Now I need to install Xen, so:
>  # yum -y install xen kernel-xen
>  After installation I've tried the same command sequence:
>  cd /lib/modules/
>  cp 2.6.18-53.el5PAE/updates/megasr.ko 2.6.18-53.1.14.el5xen/updates/
>  depmod -a 2.6.18-53.1.14.el5xen
>  mkinitrd /boot/initrd-2.6.18-53.1.14.el5xen-new.img 2.6.18-53.1.14.el5xen
>  vi /etc/grub.conf (add -new, etc..)
>  BUT xen kernel won'ts start. Kernel panic, 'unable to mount root', etc.
>  Am I missing something?
>  Is it possible to make it work?

You cannot just copy the module built for the PAE kernel to use it for
the xen kernel.  Check the module by running:

/sbin/modinfo /lib/modules/2.6.18-53.el5PAE/updates/megasr.ko

and look for vermagic: .  The kernel type should match your running
kernel.  You would need to build one for the xen kernel if the
precompiled module is not available.