7

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
  • Is this a virtual machine? With what provider? – Michael Hampton Aug 22 '14 at 14:27
  • Yes, it lives inside a KVM hypervisor – Kristofer Aug 24 '14 at 20:26
4

Found the problem... Apparently CentOS 6 does not properly sync /etc/grub.conf with /boot/grub/grub.conf so /boot/grub/grub.conf which read during boot. Fixed with:

rm /boot/grub/grub.conf
mv /etc/grub.conf /boot/grub/ 
ln -s /boot/grub/grub.conf /etc/grub.conf
  • I was wondering about that. /boot/grub/grub.conf is the correct file, and it should be present there, not in /etc. – Michael Hampton Aug 25 '14 at 11:33
  • This seems off. There's always a symbolic link from /etc/grub.conf to ../boot/grub/grub.conf - Did something happen with your /boot partition at some point? – ewwhite Aug 25 '14 at 12:26
  • 1
    I don't believe so, we have noticed this happening on all our CentOS 6 boxes. Could be related to our automated installation somehow but I doubt it as we are not messing around with grub in the install script. – Kristofer Aug 25 '14 at 13:46
2

You have to reboot Linux in order for a new kernel to become active.

If you notice, the newly-installed kernel, version 2.6.32-431.23.3.el6.x86_64, is set to be the default in the grub configuration (default=0)

Did you verify that you ran a system reboot following your updates?


  • Can you check the free space in /boot?
  • You can run a yum reinstall of the kernel packages just to ensure everything is installed properly.
  • If you DO reboot, see what shows up in the GRUB menu after the system POST sequence.
  • Yes, I'm sure it rebooted, several times even. I even looked at the grub menu which just shows the latter two of the entries. – Kristofer Aug 22 '14 at 14:04
  • How much free space is in /boot ? – ewwhite Aug 22 '14 at 14:06
  • This also happened on multiple machines. I ran a cleanup of old kernels (package-cleanup -y --oldkernels --count=2) before and after update since our boot partitions are small. It has 45MB free after both cleaning and both kernels installed. I did another yum reinstall to no avail... – Kristofer Aug 22 '14 at 14:18
1

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.

  • Just checked and "direct kernel boot" is not enabled – Kristofer Aug 25 '14 at 6:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.