[CentOS 6.7/Areca RAID] Kernel Update results in Pid: 1, comm: init Not tainted

When performing a “yum update” on a CentOS 6.5 server to bring it up to CentOS 6.7 the Areca RAID driver wasn’t compiled in the ramdisk for the kernel (or installed for the kernel) even after installing kmod-arcmsr-1.30.0X.20_rhel6.7-1.x86_64.rpm resulting in the following error:

Kernel panic – not syncing: Attempted to kill init!

Pid: 1, comm: init Not tainted 2.6.32-573.3.1.el6.x86_64 #1

The problem is that even with installing the new RPM for the 6.7 OS it’s installing it to the modules directory for the 2.6.32-573 modules directory about building a ramdisk for that kernel instead of the more updated 2.6.32-573.3.1.  You can see evidence of this in the post install scripts for the rpm:

[root@server src]# rpm -q –scripts kmod-arcmsr-1.30.0X.20_rhel6.7-1.x86_64

postinstall scriptlet (using /bin/sh):

if [ -e “/boot/System.map-2.6.32-573.el6.x86_64” ]; then

/sbin/depmod -aeF “/boot/System.map-2.6.32-573.el6.x86_64” “2.6.32-573.el6.x86_64” > /dev/null || :

fi

modules=( $(find /lib/modules/2.6.32-573.el6.x86_64/extra/arcmsr | grep ‘\.ko$’) )

if [ -x “/sbin/weak-modules” ]; then

printf ‘%s\n’ “${modules[@]}”     | /sbin/weak-modules –add-modules

fi

[truncated to show just the post install script]

 

This RPM does in fact work with the updated kernel (as expected) so the solution is to copy the kernel module over, run the post script for the RPM with the updated kernel module directory, and rebuild the ramdisk.  The following are the commands to run without the output.

cp -r /lib/modules/2.6.32-573.el6.x86_64/extra/arcmsr /lib/modules/2.6.32-573.3.1.el6.x86_64/extra/

/sbin/depmod -aeF “/boot/System.map-2.6.32-573.3.1el6.x86_64” “2.6.32-573.3.1.el6.x86_64”

modules=( $(find /lib/modules/2.6.32-573.3.1.el6.x86_64/extra/arcmsr | grep ‘\.ko$’) )

printf ‘%s\n’ “${modules[@]}”     | /sbin/weak-modules –add-modules

The weak-modules will rebuild the ramdisk however ours failed with an unexpected EOF error from gzip when doing it so we rebuilt the ramdisk again:

mkinitrd –force /boot/initramfs-2.6.32-573.3.1.el6.x86_64.img 2.6.32-573.3.1.el6.x86_64

After that the machine rebooting just fine.