Skip to main content
All CollectionsVPS Hosting
Upgrading kernel version
Upgrading kernel version
Ieva avatar
Written by Ieva
Updated over a week ago

Our KVM VPS has the possibility of upgrading the kernel version which is one of the most common reasons why some of the customers choose the KVM VPS over the Standard VPS. A higher version of the kernel is required by some of the applications or services.

By default does not have the latest kernel version available so this article might help to resolve the case. We will provide the details on how to manually change your kernel version.

First, it is always good to know, what is the current version of your kernel, you can check that with the following command:

uname -sr

The outcome should be simple and specific:

Linux 4.14.0-041400-generic

Kernel upgrade for Ubuntu

Secondly, you need to download the required files for your chosen kernel version. All the available kernel versions can be found in this page:

Source provides all the required files for kernel to upgrade. Once you check the specific version of Kernel you may see many links to download, for example:

The first one is required, and then you need the rest of the 2, which both have to match for example both generic or both low-latency.

You download all the files for example:

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.14/linux-headers-4.14.0-041400-generic_4.14.0-041400.201711122031_amd64.deb wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.14/linux-image-4.14.0-041400-generic_4.14.0-041400.201711122031_amd64.deb wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.14/linux-headers-4.14.0-041400_4.14.0-041400.201711122031_all.deb

Once the download is complete you need to install it with the following command:

dpkg -i *.deb

It may take up to few minutes, but once it is done you have to reboot the system for changes to become active:

reboot

After reboot you may check and make sure the kernel version is upgraded:

uname -sr

That is it. Your Kernel version is upgraded for your Ubuntu system.

Kernel upgrade for CentOS

We will be using ELRepo, a third-party repository that makes the upgrade to a recent version a kernel. To enable these repositories you will need to execute the following commands:

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm

Once you install the repositories, you will need to list the available packages:

yum --disablerepo="*" --enablerepo="elrepo-kernel" list available

You will be presented will all the available packages, like this:

We will choose the main kernel package: kernel-ml (it is not shown in the image above since we installed it already). To upgrade your Kernel to the latest version use the following command:

yum --enablerepo=elrepo-kernel install kernel-ml

After the upgrade reboot the server:

reboot

Check the kernel version again:

uname -sr

The kernel version may not be changed instantly, so you will have to do the last changes and set the default Kernel version in GRUB. Open a GRUB configuration:

nano /etc/default/grub

You will have to change one line as in the example below and save it:

GRUB_DEFAULT=0

The following command will recreate the Kernel configuration within GRUB:

grub2-mkconfig -o /boot/grub2/grub.cfg

One final reboot is needed after this, and your Kernel version will be changed.

Did this answer your question?