Custom Kernel

When you install Linux to your computer, it will come with an pre-defined kernel version from the OS. As time goes by, the kernel version maybe out of date. Typically the OS vendor will provide updates to the kernel over time, however there might be situations where by you wish to install a custom kernel to the server rather than using the default distribution kernel.

To find the latest kernel version you can review the following page:

https://en.wikipedia.org/wiki/Linux_kernel#3.x.y_releases
https://en.wikipedia.org/wiki/Linux_kernel#4.x.y_releases

Once you have decided on the kernel version, to get the custom kernel, you can visit the following link for the pre-defined kernels and the options for the kernel:

ftp://ftp.ovh.net/made-in-ovh/bzImage/

In our case we will choose the kernel version 4.1. The exact version would be:

bzImage-4.1.7-xxxx-grs-ipv6-64

The first step in upgrading the kernel is to change to the correct directory for the kernel to be downloaded to. The directly location would be cd /boot directory. Once inside this directory we can look to download the kernel and the System.map file.

wget ftp://ftp.ovh.net/made-in-ovh/bzImage/4.1.7/bzImage-4.1.7-xxxx-grs-ipv6-64

Resolving ftp.ovh.net (ftp.ovh.net)... 213.186.33.9
Connecting to ftp.ovh.net (ftp.ovh.net)|213.186.33.9|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /made-in-ovh/bzImage/4.1.7 ... done.
==> SIZE bzImage-4.1.7-xxxx-grs-ipv6-64 ... 9023024
==> PASV ... done.    ==> RETR bzImage-4.1.7-xxxx-grs-ipv6-64 ... done.
Length: 9023024 (8.6M) (unauthoritative)

100%[============================>] 9,023,024   --.-K/s   in 0.1s

wget ftp://ftp.ovh.net/made-in-ovh/bzImage/4.1.7/System.map-4.1.7-xxxx-grs-ipv6-64

Resolving ftp.ovh.net (ftp.ovh.net)... 213.186.33.9
Connecting to ftp.ovh.net (ftp.ovh.net)|213.186.33.9|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /made-in-ovh/bzImage/4.1.7 ... done.
==> SIZE System.map-4.1.7-xxxx-grs-ipv6-64 ... 3246834
==> PASV ... done.    ==> RETR System.map-4.1.7-xxxx-grs-ipv6-64 ... done.
Length: 3246834 (3.1M) (unauthoritative)

100%[============================>] 3,246,834   --.-K/s   in 0.07s   
 

The last part is to run update-grub. This will update the grub for the bootloader.

update-grub

Generating grub.cfg ...
Warning: update-grub_lib is deprecated, use grub-mkconfig_lib instead
Found linux image: /boot/bzImage-4.1.7-xxxx-grs-ipv6-64
  No volume groups found
done