Page 1 of 7

How To: Upgrade your kernel, painlessly.

Posted: Thu Jan 21, 2010 4:22 pm
by Kendall
If in the outside chance you feel you need to upgrade your kernel for any particular reason, this is how you do it THE EASY WAY. Note that this guide requires no compiling and works for Mint and Ubuntu only (it's probable that this works for other Ubuntu derivatives, but I haven't tested it and can therefore offer no opinion).

- 1 - Go to this website http://kernel.ubuntu.com/~kernel-ppa/mainline/ and you'll see a huge directory tree of kernels. Find the directory for the kernel you want/need and click on it.

- 2 - In each of these directories you're going to see "BUILD.LOG", "CHANGES", three items that begin with "linux-headers", two that begin with "linux-image" and one that begins with "linux-source". The "BUILD.LOG", "CHANGES", and "linux-source" are completely unimportant right now. We're only worried about "linux-headers" and "linux-image".

- 3 - Download and then install the following IN THIS ORDER: first get the linux-headers file that ends with "all.deb". Second get the linux-headers file that ends with "i386.deb" or "amd64.deb" depending upon what architecture you need. Finally get the linux-image file that ends with "i386.deb" or "amd64.deb" again depending upon what architecture you need. Honestly it doesn't really matter what order you download them in, but you need to make absolutely sure that you install them in this order.

- 4 - Reboot your computer and you're done.

Image

Disclaimer: I do this all the time and it's yet to not work for me. You do need to understand that there is an inherent risk associated with all low level system stuff like this. If it borks your system, I claim no responsibility.

Re: How To: Upgrade your kernel, painlessly.

Posted: Thu Jan 21, 2010 5:58 pm
by smsmith
Kendall wrote:Disclaimer: I do this all the time and it's yet to not work for me. You do need to understand that there is an inherent risk associated with all low level system stuff like this. If it borks your system, I claim no responsibility.
Could you post a how to "unupgrade" in the event the system doesn't respond, well, pleasantly, afterwards?

I, too, have used this procedure effectively in the past.

Re: How To: Upgrade your kernel, painlessly.

Posted: Thu Jan 21, 2010 6:03 pm
by MaddogF16
Would also like to add that during the install of each of the .deb files, I like to click on the "triangle next to terminal" and watch the install happen and watch for any issues (especially true if you have proprietary drivers), this way you can make sure those drivers build properly against the kernel. If you see a failed proprietary driver build, "Don't boot into that kernel".

Just my $.02 worth of nothing. :)

Re: How To: Upgrade your kernel, painlessly.

Posted: Thu Jan 21, 2010 11:46 pm
by Kendall
smsmith wrote:Could you post a how to "unupgrade" in the event the system doesn't respond, well, pleasantly, afterwards?
The simple solution is to simply not boot into that kernel, but I'll try and throw something together that adequately explains how to eliminate that particular kernel as an option.
MaddogF16 wrote:Would also like to add that during the install of each of the .deb files, I like to click on the "triangle next to terminal" and watch the install happen and watch for any issues (especially true if you have proprietary drivers), this way you can make sure those drivers build properly against the kernel. If you see a failed proprietary driver build, "Don't boot into that kernel".
I usually install via with "dpkg -l package-name.deb" so everything's right there in the first place, but if installing with gdebi, then this is very good information.

Re: How To: Upgrade your kernel, painlessly.

Posted: Fri Jan 22, 2010 12:04 pm
by linuxviolin
smsmith wrote:Could you post a how to "unupgrade" in the event the system doesn't respond, well, pleasantly, afterwards?
Kendall wrote:
smsmith wrote:Could you post a how to "unupgrade" in the event the system doesn't respond, well, pleasantly, afterwards?
The simple solution is to simply not boot into that kernel, but I'll try and throw something together that adequately explains how to eliminate that particular kernel as an option.
What is the problem here? It's very simple. When you install the new kernel, the old kernel is always there, its grub entry is also always there. The new kernel is just installed in addition, so if at reboot there is a problem, just reboot in the old kernel which works then open Synaptic (or if you prefer, you can use the command line) and remove the packages of the new kernel. :wink:

Re: How To: Upgrade your kernel, painlessly.

Posted: Fri Jan 22, 2010 4:49 pm
by smsmith
linuxviolin wrote:
smsmith wrote:Could you post a how to "unupgrade" in the event the system doesn't respond, well, pleasantly, afterwards?
Kendall wrote:
smsmith wrote:Could you post a how to "unupgrade" in the event the system doesn't respond, well, pleasantly, afterwards?
The simple solution is to simply not boot into that kernel, but I'll try and throw something together that adequately explains how to eliminate that particular kernel as an option.
What is the problem here?
No problem here. I just thought it'd be nice to have a back-out how to posted as well for those of us that stumble across this and decide, "Well, that sounds easy enough". And then, if mayhem ensues, presumably we've read the whole thing and would have a way to go backwards. :D

But, a hypothetical for you. Suppose I decide to boot up my computer and then go get some coffee, forgetting that the kernel update I did broke something major. Grub has an auto timeout to boot whichever kernel is FIRST in the list. As I am away getting my coffee, I boot into the broken kernel. Now I need to reboot.

And since I was the one asking, here's how I backed out one of the kernels I tried in the hopes it fixed something else irritating me, only to find out that my sound no longer worked...

1. Open up KPackageKit or whatever it is you use to manage packages.
2. Searched for linux-headers.
3. Selected for removal the linux-headers version that matched the not-so-nice kernel. Hit apply.
4. Repeat steps 2 and 3 using linux-image.
5. Close KPackageKit.

On reboot, the offending kernel was no longer listed in Grub.

:wink:

Re: How To: Upgrade your kernel, painlessly.

Posted: Fri Jan 22, 2010 7:19 pm
by Kendall
Thanks for posting that information. :wink:

Re: How To: Upgrade your kernel, painlessly.

Posted: Sun Jan 24, 2010 9:36 am
by Husse
Interesting info (this sounds just like a spammer :))
I'll make it sticky

Re: How To: Upgrade your kernel, painlessly.

Posted: Sun Jan 24, 2010 7:02 pm
by DasFox
I've never payed attention before, but why two linux headers need to be installed, the all.deb and arch.deb?

Also 'dpkg -l' is the best way to install?

THANKS

Re: How To: Upgrade your kernel, painlessly.

Posted: Sun Jan 24, 2010 10:50 pm
by Kendall
DasFox wrote:Also 'dpkg -l' is the best way to install?
"dpkg -i" is recommended as it's in a terminal and you'll see any errors as they show up. However installing via Synaptic (or another graphical package manager) is fine as well.

Re: How To: Upgrade your kernel, painlessly.

Posted: Mon Jan 25, 2010 2:46 am
by DasFox
Kendall wrote:
DasFox wrote:Also 'dpkg -l' is the best way to install?
"dpkg -i" is recommended as it's in a terminal and you'll see any errors as they show up. However installing via Synaptic (or another graphical package manager) is fine as well.

Ok thanks, I'm a old Linux geek so I do know the CLI. ;)

THANKS

Re: How To: Upgrade your kernel, painlessly.

Posted: Thu Mar 11, 2010 7:40 pm
by Aging Technogeek
icekool,

Using Kendall's method you can install any kernel in the Ubuntu repo (the 2.6.34 RC1 was just added). Using update manager you can only get the latest update for the 2.6.31 kernel.

Re: How To: Upgrade your kernel, painlessly.

Posted: Thu Mar 11, 2010 10:14 pm
by Aging Technogeek
If what you have works without any problems why take the chance of regression or broken dependencies that is always present when upgrading the kernel?

At present, I'm using 2.6.31-20 (the latest in Update Manager) because of the security problems discussed here

http://news.softpedia.com/news/10-Kerne ... 4162.shtml

But otherwise i was happy with the 31-14 kernel originally installed.

Re: How To: Upgrade your kernel, painlessly.

Posted: Fri Mar 12, 2010 8:15 am
by newW2
Note: if you are using the restricted drivers you may get an error (if using the command line: it will identify the driver and fail). If you just double click the .deb files you may miss this and when you reboot you get a message that Ubuntu will / can launch in low graphics mode, or you can reconfigure etc.
So I suggest that you remove the restricted driver before you start the how-to, which btw is very good.
I was using the nvidia 185.nn.nn driver on my laptop

Re: How To: Upgrade your kernel, painlessly.

Posted: Sat Mar 13, 2010 11:52 am
by Aging Technogeek
Note to Mint 8 users:

Remember to run "sudo update-grub" after installing your new kernel or it will not show in the boot menu.

Re: How To: Upgrade your kernel, painlessly.

Posted: Sun Apr 18, 2010 5:36 am
by recent-convert
Thanks for this! :D

If anyone else with an Intel wireless 6200 WLAN is having trouble in Mint 8 (e.g. Dell Studio 1558 users), following the above kernel upgrade method seems to have worked for me. I chose the 2.6.32.9 kernel at http://kernel.ubuntu.com/~kernel-ppa/ma ... v2.6.32.9/ and it connected to my wifi immediately after rebooting.

Re: How To: Upgrade your kernel, painlessly.

Posted: Sun Apr 18, 2010 7:32 am
by linuxviolin
Well guys, the problems with upgrade the kernels are... sad for Ubuntu. I have done many kernels updates in other distros (e.g. Frugalware, Debian Testing, CentOS, Fedora, Parsix...) over the years with absolutely no problems. Never. And with different computers with different hardware. Ok I don't use wireless etc but still. Maybe I'm a lucky man? :lol:

Re: How To: Upgrade your kernel, painlessly.

Posted: Mon May 31, 2010 3:55 am
by jessewilliams
Great stuff man! Following the steps was a bit hard but I managed to push through. I could use this for as long as Unix is alive! Great work on the tutorial man. I guess you know how much help you have shared! God Bless!

Re: How To: Upgrade your kernel, painlessly.

Posted: Wed Jun 02, 2010 1:48 am
by vrkalak
I just upgraded my Debian 'testing' -Xfce install from 2.6.32-5 amd-64 ... to the new Liquorix 2.6.34-39_amd-64 Kernel.

The download and install went smoothly.
I just had to make sure to install the 2 Images and the Header in the correct order.
Followed the directions from the OP in this thread ... no problems.

The re-boot was unremarkable ... and slightly faster.
Opened a Terminal and checked that, indeed, the new Kernel was there ... :D
Internet connection works great.

Seems to be 'all systems go'

I'll let you know if I notice a marked performance upgrade.

Re: How To: Upgrade your kernel, painlessly.

Posted: Sat Jun 19, 2010 8:07 pm
by kidambi502002
nice post, the upgrading the kernel painlessly I did it without any pain. thanks.