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.

My current kernel version shown by uname -r is: 3.5.0-17-generic.
However, there are files related to newer version kernel 3.5.0-26 in /boot. So I want to upgrade the kernel to 3.5.0-26 by running: sudo apt-get install linux-image-3.5.0-26-generic. But it shows:

linux-image-3.5.0-26-generic is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I tried sudo apt-get purge linux-image-3.5.0-26-generic, then re-install it by sudo apt-get install linux-image-3.5.0-26-generic. This time, I can install the newer kernel, but uname -r stil shows 3.5.0-17. I didn't try the other way around, that is, removing kernel 3.5.0-17-generic, since it is the currently used one, I am afraid removing it might cause problems.

So I am confused. If linux-image-3.5.0-26-generic is already the newest version, why uname -r shows 3.5.0-17 that is an older version?

PS: before this, I have no space problem in /boot, and I cannot update any packages. As I said, my current kernel version is 3.5.0-17. But there are many files related to newer version kernels, ranging from version 3.5.0-18 to 3.5.0-26. So I found a script to remove all of them, but files related to 3.5.0-26 are still there.

share|improve this question
    
Did you tried to reinstall package? You can try it by sudo apt-get install --reinstall linux-image-$(uname -r). Also, you can try t fix problems by adding -f argument. –  Sebastian Potasiak Mar 30 '13 at 17:13
    
Thanks. I tried that with --reinstall and -f options. Then I install the newer 3.5.0-26 kernel by sudo apt-get install linux-image-3.5.0-26-generic; there is an error that shows the kernel header files are not found. So I also install the kernel header packages, then reinstall 3.5.0-26 kernel. However, uname -r still shows 3.5.0-17. –  Fashandge Mar 30 '13 at 21:27
    
So, maybe it's some kind of problem with linux kernel package itself? Have you tried to install another version? –  Sebastian Potasiak Mar 30 '13 at 21:31

1 Answer 1

Warning: this answer assumes that you are running either Ubuntu 12.04.1 or just 12.04, and that you are not using the xorg-edgers PPA. Please do not enter any of the following commands or install any packages if you are not sure of what they do.

Install a specific kernel version

It appears you need to install both kernel images themselves and explicitly specify their corresponding headers' packages (e.g. packages linux-image-[version]-generic and linux-headers-[version]-generic) before Ubuntu/Grub will accept/run them.

To accomplish this, run the following commands in a terminal:

  1. sudo apt-get install linux-image-[version]-generic linux-headers-[version]-generic (replace [version] with your desired version)
  2. sudo update-grub

Make sure that update-grub "finds" the kernel version that apt-get just installed. Then reboot, and verify that Grub boots Ubuntu using your new kernel. Also, do not delete the old kernel(s) before your system has been tested thoroughly running the new one.

Install the most recent Canonical-maintained kernel version

This part is not really an answer to your question, but - depending on your goals - it might still prove useful.

If you want Ubuntu/apt keep up with new kernel releases as part of system updates, instead of having to specify them yourself, I recommend installing linux-image-generic-lts-raring and - if necessary - linux-headers-generic-lts-raring.

To accomplish this, do as above but run the following commands instead:

  1. sudo apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raring
  2. sudo update-grub

In October 2013, once Ubuntu 13.10 (saucy) is released, similar lts-packages will appear for kernel backports from that release as well. The same goes for backports from Ubuntu 14.04 in April 2014. See LTSEnablementStack at the Ubuntu wiki for more information.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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