How to upgrade to a new kernel version without crashing your Server.
Lets say you are updating your server’s kernel manually or installing a custom kernel. Assume that you don’t have IPMI (KVM over IP) and you are not sure if your server will boot fine with the new kernel. Such scenarios are a nightmare for any system admin who works remotely as its a risk and if your server doesn’t boot with the new kernel, you are completely lost!
So here we would explain to you how we could safely tackle such a situation. The workaround for this is to to test the new kernel by changing the grub default kernel temporarily. You can either modify the grub.conf file or make the changes via grub command prompt.
In the below example, the current kernel is CentOS 2.6.32-431.29.2.el6.x86_64 and Openvz 2.6.32-042stab093.5 is my new kernel.
Now, I want to safely reboot the server with new kernel and see if the server comes up fine. I am not going to change grub.conf, instead you can set the new kernel to load just once via grub command prompt by following the below steps.
Quit the command prompt and reboot the server to see if the new kernel loads fine. If it does, edit grub.conf and set the default kernel as the new one.
Otherwise, reboot the server again and it will load your old kernel. Now, start debugging why your new kernel didn’t load.