MainlineBuilds

Revision 7 as of 2009-03-02 08:50:01

Clear message

Generally Ubuntu systems run with the stock Ubuntu kernels. However it is handy to be able to test with unmodified mainline 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 mainline kernel builds. These mainline 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.

Mainline Kernels Archive

The mainline kernels archive is located at the URL below, there is a directory for each mainline build:

  • http://kernel.ubuntu.com/~kernel-ppa/mainline

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

Installing Mainline Kernels

To use the mainline kernel as-is you only only need to download and install the *image*.deb package that corresponds to your architecture, however if you need to build any external modules you also need the correct *header*.deb and *source*.deb packages.

To install, download the common headers, architecture specific headers, and the architecture specific image. For example for 2.6.27.15 we have the following files, for i386 you would need those marked with B and C, amd64 take those marked A & C:

  • A       linux-headers-2.6.27-02062715-generic_2.6.27-02062715_amd64.deb
    B       linux-headers-2.6.27-02062715-generic_2.6.27-02062715_i386.deb
    C       linux-headers-2.6.27-02062715_2.6.27-02062715_all.deb
    A       linux-image-2.6.27-02062715-generic_2.6.27-02062715_amd64.deb
    B       linux-image-2.6.27-02062715-generic_2.6.27-02062715_i386.deb

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

  • dpkg -i *.deb

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

  • Ubuntu Intrepid, kernel 2.6.27-02062715-generic

Uninstalling Mainline Kernels

The mainline 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 a mainline kernel anyway, first use:

  • dpkg -l | grep image

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

  • sudo apt-get remove KERNEL_PACKAGE_TO_REMOVE

Limitations

Although the mainline kernels are built using the Ubuntu configuration files they do not include any ubuntu specific drivers, if you use any of these drivers these kernels are likely to fail for you. There is also no restricted modules for these kernels. Finally they are also not modified for a specific Ubuntu release. 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.

The kernel team does not support these kernels, use them at your own risk.