How do I update kernel to the latest mainline version? [duplicate]

Currently I'm running opensuse 13.2 and I want to update it to a (ubuntu)linux with the newest kernel the 4.9.xy release as mentioned at http://www.kernel.org.

Is the latest kernel 4.9.xy version available for Ubuntu?

or - Can I update this - after having installed Ubuntu without any risk of crashes? I'm updating my kernel regularly as provided by the Update Manager..

Is there a way to install Ubuntu - and afterwards easily upgrade to the newest kernel?


Solution 1:

The risk of crashes is highest with release candidate new kernels at this time February 4, 2017 version 4.10 release candidate 4.10-rc6 is the newest. Mainline kernels are considered stable and the latest version here is 4.9.8 which I installed a few hours ago.

Finding the right kernel

Rather than the link you are using, go to (kernel.ubuntu.com - Kernel PPA Mainline) and press the End key:

Mainline kernel 1

Now click on the link 4.9.8 and this screen appears:

mainline kernel 2

Note the links with the black airbrush marks. These are the three we will download for Ubuntu 16.04 64-Bit using Intel or AMD processors.

Installing using Terminal

Open a terminal session with ctrl+Alt+T and use:

cd Downloads # Assuming this is your browser download directory
rm *.deb     # This erases all *.deb files, ensure only old ones are here

Now toggle back to the download screen above and single-click on all three of the .deb kernel downloads. After downloads complete (you'll see status in your browser) toggle back to terminal session and use:

sudo dpkg -i *.deb
rm *.deb
reboot

Voila! - you are running the latest kernel when first option in grub boot menu is selected. Your older kernel versions are still available under grub's Advanced Options menu.

After installing the newest kernel a dozen times you will ask the question "How do I remove older kernel versions?" and you will find those answers here and here in Ask Ubuntu.

Solution 2:

There is no Ubuntu that contains any vanilla kernel.org kernel.

The current Ubuntu kernels are based on the 4.4 and 4.8 mainline kernels. Ubuntu kernels get security updates and bug fixes from the latest mainline kernels.

If you want to have the latest vanilla kernel, you can install it from Ubuntu kernel PPA.

But mainline kernels are not officially supported and may have stability issues on Ubuntu. And questions regarding problems with them are off-topic at this site.