Kernel Panic after Yum Update – CentOS with Hyper-V Linux Integration Components

I am runnning CentOS 5.5 in a VM on Hyper-V. I created a fresh installation. I then installed Hyper-V Linux Integration Components. After Installing them I ran yum update.

After running a “yum update”, and rebooting I received this error.

Unable to access resume device (/dev/VolGroup00/LogVol01)
mount: could not find filesystem ‘/dev/root’
setuproot: moving /dev failed: No such file or directory
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
switchroot: mount failed: No such file or directory
Kernel panic – not syncing: Attempted to kill init!

During the yum update process, it updated my kernel. Kernels that are installed after Hyper-V Linux Integration Components don’t always mesh well together. Here is how I fixed my issue.

While booting, grub will ask you to hit any key to boot into the menu.

Hit any key and you will see a list of the Linux kernels on your machine.

Mine looks like:

CentOS (2.6.19-194.26.1.el5)
CentOS (2.6.18-194.el5)

The first one(newest) is booting by default and causing the issues. I will select my old kernel for the time being so that I can boot into linux and fix the issue with the new kernel.

So I will select CentOS (2.6.18-194.el5) and boot into linux. At this point, it should boot into linux normally.

Now, virtually put in your Linux Integration Components V2.1 CD into the VM.
As root, run:

mkdir /opt/linux_ic_v21_rtm
cp -r /media/CDROM/* /opt/linux_ic_v21_rtm
cd /opt/linux_ic_v21_rtm
grep -ilR uname * | xargs sed -i ‘s/uname \-r/echo “2.6.19-194.26.1.el5″/g’
make && make install
reboot

Replace 2.6.19-194.26.1.el5 with the kernel that is giving you grief. If you forgot which kernel it was you can double check the /boot/grub/grub.conf file. Chances are its the one on the top.

After the reboot, it should be able to boot into the new kernel.

Leave a Reply

Your email address will not be published.