Ubuntu – How to install a newer kernel


I'm running the current stable Ubuntu version (Oneiric) but have issues with the shipped kernel. Newer kernel versions seem to have fixed it, but the kernel-ppa/ppa does not contain the most recent kernel which is why I want to install the kernel from the next stable version (Precise). Since I want to be able to unload out of tree kernel modules, the mainline kernel from http://kernel.ubuntu.com/~kernel-ppa/mainline cannot be used.

I also have have Virtual Box installed which also need to work in the new kernel so the "kernel headers" have to be upgraded as well.

How am I supposed to install the kernel packages from the next stable version (Precise) without upgrading all other packages?

Best Answer

You can install the mainline kernel from the ppa


Or you can compile it yourself


The problem you are going to have with those options is twofold

  1. Neither the mainline kernel or compiling a newer kernel are going to have the standard set of patches Ubuntu applies, most notable is Apparmor.

  2. Any packages that depend on the kernel, Virtualbox, nvidia, wireless, etc, might not work.

You would need to debug those things yourself or wait for the Kernel team to release an updated kernel. Support for the mainline kernel or custom kernel is limited, more so for third party packages such as virtualbox , nvidia drivers, etc.

I am not trying to either encourage or discourage you, just pointing you in the right direction. I have been using a custom kernel on gentoo for almost 2 years now, but doing so requires a moderate amount of effort on my part.

From the kernel team FAQ

The mainline kernels builds are produced for debugging purposes and therefore come with no support. Use them at your own risk.

Your other option is to build a custom kernel. This is also poorly supported and requires some advanced knowledge

See https://help.ubuntu.com/community/Kernel/Compile

Building and using a custom kernel will make it very difficult to get support for your system. While it is a learning experience to compile your own kernel, you will not be allowed to file bugs on the custom-built kernel (if you do, they will be Rejected without further explanation).

Your best option may be to install 12.04. Be warned it is in beta at the moment, you might want to wait for the release.

  • You may be better off filing a bug report

How do I report a bug?

Related Question