Redhat – Reboot fails on RHEL 6.1 after kernel update on Amazon EC2

amazon ec2kernelredhatrhel6

Everytime I start a new RHEL instance, I like to perform a yum update to start with the most up-to-date system. However, everytime I try to reboot the instance after that, the instance never goes live anymore.

I troubleshooted the root cause to be the kernel update, here are the minimum steps to reproduce the problem:

  1. Launch a new RHEL 6.1 instance
  2. Connect, then run:
    1. yum update kernel*
    2. reboot

The system stays down.
The system log from the EC2 management console doesn't help much:

...
Please stand by while rebooting the system...
md: stopping all md devices.
xenbus_dev_shutdown: device/console/0: Initialising != Connected, skipping
Restarting system.

No mention of a kernel panic, startup problem, etc. Just stuck there.

From what I can read around, it looks like you can't use the default kernels with an EC2 instance. If that is true, how can I avoid to accidentally update the kernel with yum, and thus killing my instance, when performing a generic yum update?

Best Answer

just edit the file: /etc/yum.conf and add an entry in it like this:

exclude = kernel*

After it, yum will exclude all packages, having kernel in its starting name.

You can read more details in this url:

http://www.cyberciti.biz/faq/redhat-centos-linux-yum-update-exclude-packages/

Regarding the issue that you are unable to upgrade kernel, then you are right that you CANNOT upgrade the kernel like you upgrade in normal PC. Amazon EC2 uses customized settings in case of kernel setup, for detailed info, please follow this URL that how to perform kernel upgrade on EC2 instance:

http://www.vincestross.com/2009/04/upgrade-an-ec2-instance/