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 :
---
1 | https://wiki.ubuntu.com/Kernel/MainlineBuilds |
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 :
1 | uname -r |
We can use apt to upgrade :
1 2 | 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 :
1 | http://kernel.ubuntu.com/~kernel-ppa/mainline/ |
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 –
1 | http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11-rc4/ |
There are files under the text “Build for amd64 succeeded”. We will fetch :
The .deb
file with all.deb
.
Two .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 :
1 2 3 4 | cd /tmp wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11-rc4/linux-headers-4.11.0-041100rc4_4.11.0-041100rc4.201703261831_all.deb wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11-rc4/linux-headers-4.11.0-041100rc4-generic_4.11.0-041100rc4.201703261831_amd64.deb wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11-rc4/linux-image-4.11.0-041100rc4-generic_4.11.0-041100rc4.201703261831_amd64.deb |
Make sure that all the above are fetched. Then run :
1 | 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 :
1 | dpkg --get-selections | grep linux-image |
and think to remove the old ones with :
1 | sudo apt-get remove linux-image-x.x.x-xx linux-headers-x.x.x-xx |
Reboot after the works.
Tagged With kernel update , vps upgrade ubantu 16 04 kernel amd 64 , ubuntu server up mainline kernel , ubuntu server kernel upgrade , ubuntu server is not upgraded with the latest kernel headers , ubuntu 16 04 upgrade kernel , kernel upgrade ubuntu server , https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1834 mZW0VwuNnOKrkr8R5Rfx0j9OktOmvMp9mlOi3wIXOz8bj7OrZIKfZ_zBffcT-7m1 ab3055eaaa16d1e4ba6e934757c14aae08b4e7a6&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme , https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1831 5C7IAJOPG2emm2rJgC_FfHztGSGupdsTPueUio7hcQEkJAUE86iHjyd9FiZBc2Gb d05930044d52eb6ebb9dba8a9295bce9e96bc871&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme , https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1830 tFJgVqDWQp_EJa26UGa0YWrHBGPLVjXT8z298rdJZPZBwhbvAJ-W19__YcffjL2z a03c936cbf0f1e31d906a4a2d0e4f19fb5908646&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme