Switch to a newer kernel in Ubuntu 10.04

Sometimes a newer kernel is necessary because there are newer drivers in there. If you’re having trouble with hibernate/suspend, wlan, bluetooth etc. Switching to new kernel can be a good idea.

Default kernel in 10.04 is 2.6.32 and this guide will help you update to 2.6.34.

When installing this kernel will be default because it has a higher number than 2.6.32.

During boot hold “shift” key pressed to display boot menu.

Propetary drivers graphic and wlan drivers might stop working. You have been warned.

For 32bit:
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.34-lucid/linux-headers-2.6.34-020634-generic_2.6.34-020634_i386.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.34-lucid/linux-image-2.6.34-020634-generic_2.6.34-020634_i386.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.34-lucid/linux-headers-2.6.34-020634_2.6.34-020634_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.34-lucid/linux-source-2.6.34_2.6.34-020634_all.deb

For 64bit:
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.34-lucid/linux-headers-2.6.34-020634-generic_2.6.34-020634_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.34-lucid/linux-headers-2.6.34-020634_2.6.34-020634_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.34-lucid/linux-image-2.6.34-020634-generic_2.6.34-020634_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.34-lucid/linux-source-2.6.34_2.6.34-020634_all.deb

Run this command in the same catalog as above files are downloaded:
sudo dpkg -i *.deb

Now do a restart.

If you are having trouble getting wlan to run on Broadcom chipset after upgrade. Run these commands:

cd /usr/src/linux-headers-2.6.34-020634-generic/include
sudo cp generated/* linux/

Update 2010-06-08

Some information how to uninstall it might be handy.

To uninstall 2.6.34 run these commands:

sudo dpkg –purge linux-headers-2.6.34-020634 linux-headers-2.6.34-020634-generic linux-image-2.6.34-020634-generic linux-source-2.6.34

Update 2010-06-22

Dont worry about Ubuntus updates to newer 2.6.32 or 2.6.33 kernels, they will have a lower priority in GRUB and therefore not be used as default kernel. So accept all kernel updates that update-manager offers.

About these ads

Tags:

13 Responses to “Switch to a newer kernel in Ubuntu 10.04”

  1. Josh Says:

    There should be a PPA setup for newer kernels.

    • Josh Says:

      OK after re-reading my own comment, what I was trying to get at is this is a PPA. There should be a way to add it in Ubuntu so it’s easier to do this in a package manager.

  2. William Says:

    What happens with automatic updates when new kernels come? Will it be broken or will in install a less new kernel for me again? I noticed my update-manager wanted to download and install a 2.6.32.xx kernel but I’m currently running 2.6.34 for TRIM support.

  3. usablesoftware Says:

    Dont worry about updates to newer 2.6.32 or 2.6.33 kernels, they will have a lower priority in GRUB and therefore not be used as default kernel. So accept all kernel updates.

    I have even tested 2.6.35-rc3 and most stuff worked fine with exception för wifi, so I uninstalled it, and GRUB reverted to next highest kernel number, which was good old 2.6.34.

  4. William Says:

    All right!

  5. svg Says:

    I did this quite some time ago, as I’m using a core i3/H55 and the existing ubuntu kernels don’t work well with the audio and video. Thanks for bringing it to other people’s attention.

    1) TRIM: How do you know if trim support is included in a mainline (or other) kernel? Aside from d/l-ing the source and looking through it
    ?

    2: ureadahead: This does not work (not included) in the mainline kernels. Is there an easy way to patch it w/o recompiling? Probably not. More importantly, with an SSD, does ureadahead make a difference. Because I notice my win7 boot/startup times are much better than they were using my HDD, but Ubuntu does not boot as quickly as I thought it would.

    • usablesoftware Says:

      1) A.f.a.i.k Trim is enabled on all kernels from 2.6.33 and upward (if not explicitly removed). But I do not know how to verify it. Only the SSD knows…

      Personally I did not notice any difference in speed when switching from 2.6.32 to 2.6.34. So I guess that the Trim feature does not do any miracles to SSD as it is already very fast.

      2) I am no expert at ureadahead. Do you want to speed up boot process, then use Profiling. I found a forum post about it here:

      http://linux.dipin.info/2010/07/how-to-speed-up-boot-of-ubuntu-1004.html

      I do not know if ureadahead and profiling has anything to do with each other.

  6. svg Says:

    Thanks for the reply. I checked out the link. But now that I thought it through a bit more, readahead/profiling makes no sense for an SSD because read times are not location-dependent. The whole idea behind profiling, etc., is to cut down on mechanical drive access times. SSDs have no such problem. Anyways, on my system, what hogs the most time on boot is the SATA drive enumeration. Annoying.

  7. Steve W Says:

    > During boot hold “shift” key pressed to display boot menu.

    Why is this step necessary? It doesn’t say to do anything with the boot menu.

    • usablesoftware Says:

      It is not a necessary step. Displaying the menu will tell if the installation of new kernel went correctly. Also it is good to know this if you temporary want use another kernel than the default one.

  8. brian Says:

    Thanks for this guide! Kernel 2.6.32 crashed my laptop every time I tried to open a video file – turns out to be a known problem (https://bugs.launchpad.net/xserver-xorg-video-intel/+bug/511001), fixed with 2.6.34

    I was struggling to install 2.6.34 as is not on a PPA. This blog really helped me out.

  9. Motosuna1982 Says:

    Wireless problems seem fixed with this kernel update, thanks a bunch!! :D

  10. Celox Says:

    thanks the guide!
    i tried the latest kernel 2.6.34-020634 especially for trim on my ssd.
    i have added “discard” to “/etc/fstab”

    to find out that trim is not working even though my ssd drives supports it and hdparm shows it with its feature flag (* Data Set Management TRIM supported)

    can anyone confirm this?

    you can test it with this test https://bbs.archlinux.org/viewtopic.php?pid=783965#p783965

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: