CentOS 6.5 new Kernel not active after reboot

Kristofer asked:

Today I was running some yum updates and wanted to verify that everything went through fine by making sure I had a new kernel. To my surprise I noticed that CentOS was still running 2.6.32-431.5.1.el6.x86_64 even though it looked as though 2.6.32-431.23.3.el6 was installed.

Indeed 2.6.32-431.23.3.el6 shows up in /etc/grub.conf but not in the upstart boot options. Any ideas why?

In the update log it says:

---> Package kernel-firmware.noarch 0:2.6.32-431.5.1.el6 will be updated
---> Package kernel-firmware.noarch 0:2.6.32-431.23.3.el6 will be an update

Could this be the reason? What does “will be an update” mean?

My /etc/grub.conf:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/mapper/VolGroup00-root
#          initrd /initrd-[generic-]version.img
#boot=/dev/vda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
password --encrypted $1$auui(i$sODM4ni/Zts9IlMWu.wWF/
title CentOS (2.6.32-431.23.3.el6.x86_64)
    root (hd0,0)
    kernel /vmlinuz-2.6.32-431.23.3.el6.x86_64 ro root=/dev/mapper/VolGroup00-root rd_NO_LUKS LANG=en_US.UTF-8  KEYBOARDTYPE=pc KEYTABLE=sv-latin1 rd_NO_MD rd_LVM_LV=VolGroup00/swap SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=VolGroup00/root rd_NO_DM rhgb quiet rhgb quiet audit=1
    initrd /initramfs-2.6.32-431.23.3.el6.x86_64.img
title CentOS (2.6.32-431.5.1.el6.x86_64)
    root (hd0,0)
    kernel /vmlinuz-2.6.32-431.5.1.el6.x86_64 ro root=/dev/mapper/VolGroup00-root rd_NO_LUKS LANG=en_US.UTF-8  KEYBOARDTYPE=pc KEYTABLE=sv-latin1 rd_NO_MD rd_LVM_LV=VolGroup00/swap SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=VolGroup00/root rd_NO_DM rhgb quiet rhgb quiet audit=1
    initrd /initramfs-2.6.32-431.5.1.el6.x86_64.img
title CentOS (2.6.32-431.el6.x86_64)
    root (hd0,0)
    kernel /vmlinuz-2.6.32-431.el6.x86_64 ro root=/dev/mapper/VolGroup00-root rd_NO_LUKS LANG=en_US.UTF-8  KEYBOARDTYPE=pc KEYTABLE=sv-latin1 rd_NO_MD rd_LVM_LV=VolGroup00/swap SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=VolGroup00/root rd_NO_DM rhgb quiet rhgb quiet audit=1
    initrd /initramfs-2.6.32-431.el6.x86_64.img

My answer:


Make sure you haven’t enabled direct kernel boot to boot a kernel from outside the virtual machine.

Direct kernel boot in virt-manager

The direct kernel boot XML looks like:

  <os>
    <kernel>/var/lib/libvirt/images/vmlinuz-3.15.8-200.fc20.armv7hl</kernel>
    <initrd>/var/lib/libvirt/images/initramfs-3.15.8-200.fc20.armv7hl.img</initrd>
    <cmdline>console=ttyAMA0,115200n8 rw root=/dev/mapper/armv9-root rootwait</cmdline>
    <dtb>/var/lib/libvirt/images/vexpress-v2p-ca9.dtb</dtb>
  </os>

Some providers such as Digital Ocean boot all virtual machines via direct kernel boot, and there’s no way around this in such cases.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.