The latest kernel version any user is supposed to use in Ubuntu is updated automatically via the Update Manager, so no action is normally required by user regarding kernel upgrades. Server installations will default to the GA kernel and provide the enablement kernel as optional. We are referring to mainline kernel. Previously, we talked about how to upgrade live Ubuntu 14.04 to 16.04. Here is How to Upgrade Kernel of Ubuntu Server 16.04 Cloud Server to Latest. Newer enablement stacks are meant for server including cloud.
Why Upgrade Kernel of Ubuntu Server 16.04 on Cloud Server
Every kernel update will have some sort of security fixes that close up holes that have been discovered. Kernel updates can fix other issues that could possibly make the system crash. Major updates to the kernel in Linux also brings some new functions. Major updates to the kernel improve the overall speed of the system.
People who run servers really need to be cautious. Kernel update can make a server unstable. In such case, an immediate downgrade or rather removal of kernel needed. Backup normally not needed, but it is always good to take backup before doing any work on server over SSH. Official information written here :
How to Upgrade Kernel of Ubuntu Server 16.04 (Cloud Server)
Do not run commands before reading the whole text once. You can check your server’s kernel version with this command :
We can use apt to upgrade :
apt-cache search linux-image
# apt-get install linux-image-x.x.x-xx
But we can check the latest kernels on mainline from here :
That is, we normally use the manual method. Commonly our servers are Ubuntu (amd64/64-bit). On the above web URL, we can browse the latest version as bottom most link with version number. At this time of writing, latest is this –
There are files under the text “Build for amd64 succeeded”. We will fetch :
.deb file with
.deb files with the word generic.
Normally 3 files, but sometimes there is another
.deb file with
extra. We need to wget that too.
For 64 bit Ubuntu, at this moment you need to run :
Make sure that all the above are fetched. Then run :
sudo dpkg -i linux-headers-4.11.0*.deb linux-image-4.11.0*.deb
It will take time. After completion, reboot the server.
If system becomes unstable, in such case you need to downgrade/remove the kernel. We deliberately avoided more commands to keep things easy.
How to Remove the Old Kernels of Ubuntu Server 16.04
The version you upgraded now, do not remove that version and one version back (for safety). We can get a list the kernel versions :
dpkg --get-selections | grep linux-image
and think to remove the old ones with :
sudo apt-get remove linux-image-x.x.x-xx linux-headers-x.x.x-xx
Reboot after the works.
Follow the Author of this article :