Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Can we install the latest kernel 3.4 in Kubuntu or Ubuntu 12.04 LTS? If not then please clarify the reason.

share|improve this question
    
Stay away from kernel 3.4.0-030400_3.4.0-030400.201205210521 it has a seriuos NFS bug! I know I tested it on 12.04. –  user76366 Jul 11 '12 at 13:29
1  
@EliahKagan: That's wrong. LTS-versions do get newer kernels because it needs to support newer hardware. As you point out, they don't replace the older version, but they become available as an option in the repos. –  Jo-Erlend Schinstad Jul 19 '12 at 0:59
1  
Now you can install Linux 3.4, which is Quantal's kernel, pretty easy in Precise: linux-generic-lts-quantal –  Andre Dec 2 '12 at 17:41
    
Andre, why don't you state this as an answer? It's the easiest way IMHO. –  BrunoJCM Jan 8 '13 at 2:29
    
Yes! You can ! ! –  BigSack Dec 4 '13 at 15:44

3 Answers 3

up vote 37 down vote accepted

To install Linux Kernel 3.4 on Ubuntu (or Kubuntu, etc.) 12.04, you want to use a Ubuntu version of the kernel, not the generic Linux kernel. This avoids the generic kernel problems mentioned by Thomas Ward in his answer.

A stable version of Linux 3.4 has just been released and this version has important changes for btrfs, so many users of 12.04 LTS may be interested in this kernel.

For new changes and improvements in Kernel 3.4, you can refer to this page.

You can find the Ubuntu specific kernels at this page.

There are three ways you can potentially upgrade to Ubuntu-specific kernel 3.4:

  • First, you can download the Ubuntu 3.4 kernel deb packages and install them manually. See details below.

  • Second, you can change the apt sources list as explained here: http://www.upubuntu.com/2012/05/how-to-install-kernel-340-stable-on.html. I haven't tested this approach and I'm not recommending it.

  • Third, you can wait on an official backport of this kernel in a PPA or in -backports for 12.04 LTS. I don't have any further info on this option.

Here are more details on how to do the first option:

To use a new kernel as-is you 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.

You can find the Ubuntu kernels here: http://kernel.ubuntu.com/~kernel-ppa/mainline/

Ubuntu apparently released kernel 3.4 for Precise on 21-May-2012 09:41. See this link: http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.4-precise/

Make sure you download the correct matching files (32bit or 64bit or PAE).

Open a terminal and move to the directory where you have downloaded the Ubuntu 3.4 kernel packages. If the files are in /Downloads directory then run the following command.

$ cd ~/Downloads/

Then use dpkg command to install the packages, for example, here I assume the 32-bit versions of the packages. Run the following commands one by one and type the password for sudo access when prompted.

For linux-headers (of the 3 files, this one is not architecture specific):

$ sudo dpkg -i linux-headers-3.4.0-030400_3.4.0-030400.201205210521_all.deb

For linux-headers-generic (is architecture specific):

$ sudo dpkg -i linux-headers-3.4.0-030400-generic_3.4.0-030400.201205210521_i386.deb

For linux-image-generic (is architecture specific):

$ sudo dpkg -i linux-image-3.4.0-030400-generic_3.4.0-030400.201205210521_i386.deb

If you see any warnings or errors while installing then try installing module-init-tools (latest version) first, and try again now it should work. Restart your system now; by default it will boot kernel 3.4. To check the kernel version after booting, open a terminal and type "uname -a".

share|improve this answer
1  
Of course, though, if you have no idea what you're doing with the kernel, best to not mess with it, MountainX. My post was targetted for the Ubuntu team's recommendations as to why not to upgrade, but if you know what you're doing there's no problem, because you'll know how to fix your system ;P –  Thomas W. May 25 '12 at 21:13
    
Please do not use URL shorteners, especiallly if the real URL is just twice as large as the shortened URL! –  Lekensteyn May 26 '12 at 9:13
1  
Am I missing something, or would the second option not also mean that the next software update would bring down a bunch of stuff for the current 12.10 alpha, that may not be suitable for primetime? –  Jon Hanna Jul 29 '12 at 22:27

Unless you really need to actually install the new kernel for a reason then i would just leave it. But then who am i to advise you otherwise! I have been there and tried to just to see what its like and its taken me a few different attempts before i have had any successful results. Given it wont break your install as you can always jump back to the last kernel in grub.

Ubuntu has great documentation. I suggest using this is you go for it.

Reasons for compiling a custom kernel

  • You are a kernel developer.
  • You need the kernel compiled in a special way, that the official kernel is not compiled in (for example, with some experimental feature enabled).
  • You are attempting to debug a problem in the stock Ubuntu kernel for which you have filed or will file a bug report.
  • You have hardware the stock Ubuntu kernel does not support.
  • You love computers and are curious and interested in hacking on your own GNU/Linux system to learn more about how it works (with the understanding that you'll need to fix anything you break).

This is taken from said docs aswell.

Referring to thomas post above that is true. Im sure ubuntu do actually have their own tweaked version.

Good luck!

share|improve this answer
    
another reason is: I have too much spare time that I want to spend with my Linux. –  Alvar May 26 '12 at 8:43
    
Haha i know thats exactly why i did it! –  LinuxBill May 26 '12 at 18:27
    
Another reason - the stock 12.04 kernel (v3.2) has a bug that you consistently run into that is fixed in 3.4. –  Shauna Jul 16 '12 at 16:16
1  
In my case, there are two main reasons; wlan is very slow in 12.04 and very fast in Quantal. I suspect that's because of improvements in the kernel. Also, I really want to use BtrFS, which was extremely slow in 12.04, but seems much faster in Quantal. So I'm hoping my two main griefs with 12.04 will be solved by switching to Linux 3.4. –  Jo-Erlend Schinstad Jul 19 '12 at 1:04

You can try a simple python script: https://github.com/medigeek/kmp-downloader

Requires python-bs4:

sudo apt-get install python-bs4

You can download it using this quick link: https://github.com/medigeek/kmp-downloader/tarball/master

Save the archive and extract the files. Double click on kmpd.py. If you're not sure about an option, press Enter and it will select the default one.

share|improve this answer
    
Your quick link is pointing to another project that has nothing to do with kernels, please fix it asap. –  Bruno Pereira Aug 19 '12 at 20:24

protected by Community Feb 24 at 21:13

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.