Kernel Updates without the panic - reboot fails
Posted on February 1, 2008
Filed Under Kernel, Operating Systems, Updating software, Web Hosting |
Updating your Kernel can be a very stressful excercise if the new kernel panics and wont reboot after the update, you’ll end up having to wait for someone at the datacentre, or via KVM, to cure the problem which can sometimes take hours. So…
If you are not running a customer kernel (if you don’t know the answer its probably no), then running yum -y update is good, but you need to put in a failsafe to fall back to the old or previously working kernel to save the ensuing downtime …
Run …
yum -y update
before rebooting, edit grub.conf and add …
panic=5
to the end of the kernel version lines, i.e….
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,0)
# kernel /boot/vmlinuz-version ro root=/dev/sda1
# initrd /boot/initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-53.1.4.el5)
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-53.1.4.el5 ro root=LABEL=/ panic=5
initrd /boot/initrd-2.6.18-53.1.4.el5.img
title CentOS (2.6.18-8.el5)
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-8.el5 ro root=LABEL=/ panic=5
initrd /boot/initrd-2.6.18-8.el5.img
Then run this command from SSH as root…
echo "savedefault --default=1 --once" | grub --batch
Then reboot.
This will force a reboot on the next kernel version in the list if the latest one panics and fails to load. And then you can remove the update that failed to boot…
yum remove kernel-2.6.18-53.1.4.el5
obviously use the correct version number in the above example.
And then you will want to exclude that version from subsequent updates when using yum, so add an exclude in your yum.conf [MAIN] section…
exclude=kernel-2.6.18-53.1.4.el5
again, obviously using the correct version number in the example above.
Comments
Leave a Comment
If you would like to make a comment, please fill out the form below.
You must be logged in to post a comment.
Recently
- Blue Square House 2 NOC Outage
- Frontpage error - The version (unknown) of the server extensions you are trying to uninstall cannot be uninstalled with this tool. You must upgrade this virtual server to the current version, and then use owsadm.exe to uninstall
- Webdisk opens with notepad - how to get it to work properly
- SEO and sites on the same IP address
- Kernel Updates without the panic - reboot fails
- Saving Disk Space
- White Label Reseller Web Hosting
- What are addon, sub and parked domains all about then?
- PHP Nuke install error - folder already exists
- Setting your default address in cPanel - why its better to use :fail: instead of :blackhole:
Categories
- Configuring Email in cPanel
- cPanel Web Hosting
- cPanel Webdisk
- Domain Hosting
- Domain Names
- Exim mail server
- Fantastico
- Frontpage
- Kernel
- Mail Server administration
- Multiple Domain Web Hosting
- Operating Systems
- PHP Hosting
- PHP Nuke Web Hosting
- Reseller Web Hosting
- Unbranded Web Hosting
- Updating software
- Web Hosting
