By default, Ubuntu systems run with the Ubuntu kernels provided by the Ubuntu repositories. However it is handy to be able to test with unmodified upstream kernels to help locate problems in the Ubuntu kernel patches, or to confirm that upstream has fixed the issue. To this end we now offer select upstream kernel builds. These kernels are made from unmodified kernel source but using the Ubuntu kernel configuration files. These are then packaged as Ubuntu .deb files for simple installation.

We currently build five sets of upstream kernels. All formal tags from Linus' tree and from the stable trees, plus:

  1. the daily tip of Linus' linux kernel source tree,

  2. the tip of the drm-next head of Dave Airlie's linux repository daily,

  3. the tip of the drm-intel-next head of Keith Packard's linux repository daily,

  4. the tip of the master branch of the debloat-testing tree daily,
  5. tags from the combined v2.6.32.x.y tree (by StefanBader) which is v2.6.32.x with DRM from 2.6.33.y.

This makes these kernels closer to the Lucid kernels which are based on 2.6.32 kernels with DRM backported from the 2.6.33 series.

Upstream kernels archive

The upstream kernels archive is located at the URL below. There is a directory for each build. Note, if you are testing for a bug, please do not use the daily folder, but use the latest mainline kernel at the top:

The tagged releases are found under a directory matching their tag name and which kernel configuration they were built with (<tag>-<series>). Daily releases are found in the daily sub-directory named for the date they were made.

Each build directory contains the header and image .deb files for the generic flavour i386 and amd64 architectures.

Mainline kernel mapping

In order to choose which is the closest mainline kernel to any particular Ubuntu release you can use the Ubuntu to mainline mapping table, which contains mappings from Ubuntu releases and pockets to mainline versions.

Installing upstream kernels

To boot into an upstream kernel you only need to download and install the *image*.deb package that corresponds to your architecture. As well, if you need to build any external modules you also need the correct *header*.deb and *source*.deb packages. However, what specific files one will install depends on the version of the kernel you test.

For example, let us use v3.7-rc2-raring.
If you were testing i386, you would want those marked A.
If you were testing amd64, B.

B       linux-headers-3.7.0-030700rc2-generic_3.7.0-030700rc2.201210220428_amd64.deb
A       linux-headers-3.7.0-030700rc2-generic_3.7.0-030700rc2.201210220428_i386.deb
AB      linux-headers-3.7.0-030700rc2_3.7.0-030700rc2.201210220428_all.deb
B       linux-image-3.7.0-030700rc2-generic_3.7.0-030700rc2.201210220428_amd64.deb
A       linux-image-3.7.0-030700rc2-generic_3.7.0-030700rc2.201210220428_i386.deb
B       linux-image-extra-3.7.0-030700rc2-generic_3.7.0-030700rc2.201210220428_amd64.deb
A       linux-image-extra-3.7.0-030700rc2-generic_3.7.0-030700rc2.201210220428_i386.deb

For another example, let us use v3.3.7-precise.
If you were testing i386, and your CPU supports PAE, you would want those marked with A.
If you were testing i386, and your CPU does not support PAE, B.
If you were testing amd64 C.

A       linux-headers-3.3.7-030307-generic-pae_3.3.7-030307.201205211535_i386.deb
C       linux-headers-3.3.7-030307-generic_3.3.7-030307.201205211535_amd64.deb
B       linux-headers-3.3.7-030307-generic_3.3.7-030307.201205211535_i386.deb
ABC     linux-headers-3.3.7-030307_3.3.7-030307.201205211535_all.deb
A       linux-image-3.3.7-030307-generic-pae_3.3.7-030307.201205211535_i386.deb
C       linux-image-3.3.7-030307-generic_3.3.7-030307.201205211535_amd64.deb
B       linux-image-3.3.7-030307-generic_3.3.7-030307.201205211535_i386.deb

Once you have those downloaded they will need to be installed using dpkg:

sudo dpkg -i *.deb

When this process completes you should have a new entry on your boot menu representing the upstream kernel. This will appear as an entry like this:

Ubuntu Intrepid, kernel 2.6.27-02062715-generic

Problems installing an upstream kernel

Warning /!\ Some have found issues installing an upstream kernel due to an error. For example:

Error! Bad return status for module build on kernel: 3.7.0-030700rc2-generic (x86_64)
Consult /var/lib/dkms/virtualbox/4.1.18/build/make.log for more information.

This would be due to a conflict with the installed software (VirtualBox, nvidia proprietary drivers, fglrx, wl, etc.). If possible, one would want to uninstall the conflicting package(s) first, then install the upstream kernel. This will allow you to test the upstream kernel, and provide another data point on if the removed software has a relationship to your problem.

Uninstalling upstream kernels

The upstream kernels have their own ABI namespace so they install side by side with the stock Ubuntu kernels (each kernel has a separate directory under /lib/modules/VERSION for example). This means that you can keep several mainline and Ubuntu stock kernels installed at the same time and select the one you need from the GRUB boot menu.

If you would like to uninstall an upstream kernel anyway, first use:

dpkg -l | grep "linux\-[a-z]*\-"

to find the exact name of the kernel packages you want to uninstall, and then do:

sudo apt-get remove KERNEL_PACKAGES_TO_REMOVE

Remember that several packages can belong to one kernel version: common headers, architecture specific headers and the architecture specific image.

Why do mainline kernel builds have a -<series> suffix?

Each mainline build is named by the base upstream version suffixed with an Ubuntu release name, 2.6.35-maverick. This tells us the upstream version which was built, and additionally which configuration was used to build it. This tells us which release is most compatible with the kernel as built. This does not prevent the kernel being used on other releases, though it is most likely to work correctly on the release it is build for, or earlier ones. The further away from your base kernel release you are the more likely that there will be an incompatible userspace interaction which will prevent them working for you.

Does the kernel team support the mainline kernel builds?

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

Do mainline kernel builds include Ubuntu specific drivers?

By definition the mainline kernel builds are made from virgin unaltered mainline kernel sources and therefore do not, and should not, include any Ubuntu patches or drivers. There are also no binary drivers for these kernels.

Mainline build tool chain

These kernels are built with the tool chain (gcc etc.) from the previous LTS (Ubuntu 8.04/10.04/12.04) depending on version. Therefore, out-of-tree kernel modules built with tools from other versions likely will not work. The file BUILD in later mainline builds detailing what was used.

Kernel/MainlineBuilds (last edited 2014-01-10 12:00:53 by penalvch)