Hello,
Thanks for that, the issue isn't the CentOS kernel it's more than likely something specific to KVM, my test server has a similar configuration.
In
/boot/grub/
is there no
cfg
file just a
conf
file?
In
/boot/grub/grub.conf
what is the default? You can paste the whole top portion until you get to titles in here.
Essentially you want to set the default to whatever the recent kernel is (though technically the newest kernel should be displayed as 0 in this file but I'll get to that in a minute)
My assumption is that based on what you've shown the default is set to 0 and the newest kernel is 1 - more than likely changing this to 1 then rebooting will allow you to boot into the newest kernel.
For example my server is running the following kernel:
Code:
[[email protected] grub2]# cat /boot/grub/grub.conf
#
## 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-[generic-]version.img
##boot=/dev/sda
default=3
timeout=10
#splashimage=(hd0,0)/boot/grub/splash.xpm.gz
#
title CentOS Linux (3.10.0-1062.4.1.el7.x86_64) 7 (Core)
root (hd0,0)
kernel /boot/vmlinuz-3.10.0-1062.4.1.el7.x86_64 root=/dev/vda1 console=tty0 ro vconsole.keymap=us vconsole.font=latarcyrheb-sun16 LANG=en_US.UTF-8 net.ifnames=0 biosdevname=0 nomodeset
initrd /boot/initramfs-3.10.0-1062.4.1.el7.x86_64.img
title CentOS Linux (3.10.0-1062.1.2.el7.x86_64) 7 (Core)
root (hd0,0)
kernel /boot/vmlinuz-3.10.0-1062.1.2.el7.x86_64 root=/dev/vda1 console=tty0 ro vconsole.keymap=us vconsole.font=latarcyrheb-sun16 LANG=en_US.UTF-8 net.ifnames=0 biosdevname=0 nomodeset
initrd /boot/initramfs-3.10.0-1062.1.2.el7.x86_64.img
title CentOS Linux (3.10.0-1062.1.1.el7.x86_64) 7 (Core)
root (hd0,0)
kernel /boot/vmlinuz-3.10.0-1062.1.1.el7.x86_64 root=/dev/vda1 console=tty0 ro vconsole.keymap=us vconsole.font=latarcyrheb-sun16 LANG=en_US.UTF-8 net.ifnames=0 biosdevname=0 nomodeset
initrd /boot/initramfs-3.10.0-1062.1.1.el7.x86_64.img
title CentOS Linux (3.10.0-957.27.2.el7.x86_64) 7 (Core)
root (hd0,0)
kernel /boot/vmlinuz-3.10.0-957.27.2.el7.x86_64 root=/dev/vda1 console=tty0 ro vconsole.keymap=us vconsole.font=latarcyrheb-sun16 LANG=en_US.UTF-8 net.ifnames=0 biosdevname=0 nomodeset
initrd /boot/initramfs-3.10.0-957.27.2.el7.x86_64.img
title CentOS Linux (3.10.0-957.21.3.el7.x86_64) 7 (Core)
root (hd0,0)
kernel /boot/vmlinuz-3.10.0-957.21.3.el7.x86_64 root=/dev/vda1 console=tty0 ro vconsole.keymap=us vconsole.font=latarcyrheb-sun16 LANG=en_US.UTF-8 net.ifnames=0 biosdevname=0 nomodeset
initrd /boot/initramfs-3.10.0-957.21.3.el7.x86_64.img
My grub.conf notes that my default is 0 which isn't actually the newest kernel available. To resolve this I modify that default, set to the newerst kernel on the system which is 0 and reboot, then check the kernel version once it's booted.
For the cleanup, as you can see I have quite a few older kernel versions present. Now once I'm on the latest kernel I have available and I'm sure everything is good, you can do the following to remove older kernels.
You can do this using yum-utils and the process is as follows:
If it's already installed, no worries, it'll tell you it's installed and at the latest version.
Then run the following to clean up the packages - I keep the last 3 kernel versions present and I'd recommend you keep at least two but this number can be whatever you'd like.
Code:
package-cleanup --oldkernels --count=3
Once that's done you should be able to see that you only have three of the most recent kernels installed:
Code:
[[email protected] ~]# rpm -qa |grep kernel
kernel-headers-3.10.0-1062.4.1.el7.x86_64
kernel-tools-3.10.0-1062.4.1.el7.x86_64
kernel-3.10.0-1062.1.2.el7.x86_64
kernel-tools-libs-3.10.0-1062.4.1.el7.x86_64
kernel-3.10.0-1062.4.1.el7.x86_64
kernel-3.10.0-1062.1.1.el7.x86_64
And that the grub.conf file has also been updated accordingly:
Code:
[[email protected] ~]# cat /boot/grub/grub.conf
#
## 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-[generic-]version.img
##boot=/dev/sda
default=0
timeout=10
#splashimage=(hd0,0)/boot/grub/splash.xpm.gz
#
title CentOS Linux (3.10.0-1062.4.1.el7.x86_64) 7 (Core)
root (hd0,0)
kernel /boot/vmlinuz-3.10.0-1062.4.1.el7.x86_64 root=/dev/vda1 console=tty0 ro vconsole.keymap=us vconsole.font=latarcyrheb-sun16 LANG=en_US.UTF-8 net.ifnames=0 biosdevname=0 nomodeset
initrd /boot/initramfs-3.10.0-1062.4.1.el7.x86_64.img
title CentOS Linux (3.10.0-1062.1.2.el7.x86_64) 7 (Core)
root (hd0,0)
kernel /boot/vmlinuz-3.10.0-1062.1.2.el7.x86_64 root=/dev/vda1 console=tty0 ro vconsole.keymap=us vconsole.font=latarcyrheb-sun16 LANG=en_US.UTF-8 net.ifnames=0 biosdevname=0 nomodeset
initrd /boot/initramfs-3.10.0-1062.1.2.el7.x86_64.img
title CentOS Linux (3.10.0-1062.1.1.el7.x86_64) 7 (Core)
root (hd0,0)
kernel /boot/vmlinuz-3.10.0-1062.1.1.el7.x86_64 root=/dev/vda1 console=tty0 ro vconsole.keymap=us vconsole.font=latarcyrheb-sun16 LANG=en_US.UTF-8 net.ifnames=0 biosdevname=0 nomodeset
initrd /boot/initramfs-3.10.0-1062.1.1.el7.x86_64.img