How To: Upgrade your kernel, painlessly.

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please. Before you post please read this

How To: Upgrade your kernel, painlessly.

Postby Kendall on Thu Jan 21, 2010 4:22 pm

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.
User avatar
Kendall
Level 7
Level 7
 
Posts: 1580
Joined: Mon Nov 16, 2009 12:20 pm
Location: Asheville, NC, USA

Linux Mint is funded by ads and donations.
 

Re: How To: Upgrade your kernel, painlessly.

Postby smsmith on Thu Jan 21, 2010 5:58 pm

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.
I like poetry, long walks on the beach and poking dead things with a stick.
User avatar
smsmith
Level 3
Level 3
 
Posts: 157
Joined: Thu Jul 23, 2009 1:30 pm
Location: Illinois

Re: How To: Upgrade your kernel, painlessly.

Postby MaddogF16 on Thu Jan 21, 2010 6:03 pm

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. :)
MaddogF16
Level 5
Level 5
 
Posts: 762
Joined: Tue Jun 16, 2009 10:47 am

Re: How To: Upgrade your kernel, painlessly.

Postby Kendall on Thu Jan 21, 2010 11:46 pm

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.
User avatar
Kendall
Level 7
Level 7
 
Posts: 1580
Joined: Mon Nov 16, 2009 12:20 pm
Location: Asheville, NC, USA

Re: How To: Upgrade your kernel, painlessly.

Postby linuxviolin on Fri Jan 22, 2010 12:04 pm

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:
K.I.S.S. ===> "Keep It Simple, Stupid"
"Simplicity is the ultimate sophistication." (Leonardo da Vinci)
"Everything should be made as simple as possible, but no simpler." (Albert Einstein)
User avatar
linuxviolin
Level 8
Level 8
 
Posts: 2055
Joined: Tue Feb 27, 2007 6:55 pm
Location: France

Re: How To: Upgrade your kernel, painlessly.

Postby smsmith on Fri Jan 22, 2010 4:49 pm

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:
I like poetry, long walks on the beach and poking dead things with a stick.
User avatar
smsmith
Level 3
Level 3
 
Posts: 157
Joined: Thu Jul 23, 2009 1:30 pm
Location: Illinois

Re: How To: Upgrade your kernel, painlessly.

Postby Kendall on Fri Jan 22, 2010 7:19 pm

Thanks for posting that information. :wink:
User avatar
Kendall
Level 7
Level 7
 
Posts: 1580
Joined: Mon Nov 16, 2009 12:20 pm
Location: Asheville, NC, USA

Re: How To: Upgrade your kernel, painlessly.

Postby Husse on Sun Jan 24, 2010 9:36 am

Interesting info (this sounds just like a spammer :))
I'll make it sticky
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: How To: Upgrade your kernel, painlessly.

Postby DasFox on Sun Jan 24, 2010 7:02 pm

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
DasFox
Level 3
Level 3
 
Posts: 151
Joined: Thu Apr 05, 2007 4:04 am

Re: How To: Upgrade your kernel, painlessly.

Postby Kendall on Sun Jan 24, 2010 10:50 pm

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.
User avatar
Kendall
Level 7
Level 7
 
Posts: 1580
Joined: Mon Nov 16, 2009 12:20 pm
Location: Asheville, NC, USA

Re: How To: Upgrade your kernel, painlessly.

Postby DasFox on Mon Jan 25, 2010 2:46 am

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
DasFox
Level 3
Level 3
 
Posts: 151
Joined: Thu Apr 05, 2007 4:04 am

Re: How To: Upgrade your kernel, painlessly.

Postby icekool on Thu Mar 11, 2010 6:10 pm

Kendall wrote: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.
Hi there, I just wondered (as a newbie) if there was something wrong with using Update Manager in Mint 8 as I did, it took care of everything perfectly, installed the new Kernel 2.6.31-20 and all and any dependant files, without a single error or bleep. I then rebooted using the new Kernel, tested everything I could think of, did this a few times just to be sure then used Ubuntu Tweak to delete the old Kernel and clean out the app caches.

I am glad to say that everything on my system is working perfectly, no errors whatsoever. Apart from the rebooting to test everything all that was needed were 2 clicks of a mouse for this surely this is by far the easiest way or am I missing something here???
icekool
Level 1
Level 1
 
Posts: 44
Joined: Wed Feb 10, 2010 9:40 pm

Re: How To: Upgrade your kernel, painlessly.

Postby Aging Technogeek on Thu Mar 11, 2010 7:40 pm

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.
Image

Registered Linux User 483387
User avatar
Aging Technogeek
Level 13
Level 13
 
Posts: 4605
Joined: Sun Jan 11, 2009 9:54 am
Location: Right about here

Re: How To: Upgrade your kernel, painlessly.

Postby icekool on Thu Mar 11, 2010 9:22 pm

Ah, I see Aging, thanks for explaining that, can I ask you what Kernel version you would advise one to have?
icekool
Level 1
Level 1
 
Posts: 44
Joined: Wed Feb 10, 2010 9:40 pm

Re: How To: Upgrade your kernel, painlessly.

Postby Aging Technogeek on Thu Mar 11, 2010 10:14 pm

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-Kernel-Vulnerabilities-in-Ubuntu-6-06-8-04-8-10-9-04-and-9-10-134162.shtml

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

Registered Linux User 483387
User avatar
Aging Technogeek
Level 13
Level 13
 
Posts: 4605
Joined: Sun Jan 11, 2009 9:54 am
Location: Right about here

Re: How To: Upgrade your kernel, painlessly.

Postby newW2 on Fri Mar 12, 2010 8:15 am

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
User avatar
newW2
Level 6
Level 6
 
Posts: 1081
Joined: Fri Apr 06, 2007 10:24 am
Location: USA

Re: How To: Upgrade your kernel, painlessly.

Postby Aging Technogeek on Sat Mar 13, 2010 11:52 am

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.
Image

Registered Linux User 483387
User avatar
Aging Technogeek
Level 13
Level 13
 
Posts: 4605
Joined: Sun Jan 11, 2009 9:54 am
Location: Right about here

Re: How To: Upgrade your kernel, painlessly.

Postby recent-convert on Sun Apr 18, 2010 5:36 am

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.
recent-convert
Level 1
Level 1
 
Posts: 33
Joined: Thu Dec 17, 2009 4:44 am
Location: UK

Re: How To: Upgrade your kernel, painlessly.

Postby linuxviolin on Sun Apr 18, 2010 7:32 am

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:
K.I.S.S. ===> "Keep It Simple, Stupid"
"Simplicity is the ultimate sophistication." (Leonardo da Vinci)
"Everything should be made as simple as possible, but no simpler." (Albert Einstein)
User avatar
linuxviolin
Level 8
Level 8
 
Posts: 2055
Joined: Tue Feb 27, 2007 6:55 pm
Location: France

Re: How To: Upgrade your kernel, painlessly.

Postby jessewilliams on Mon May 31, 2010 3:55 am

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!
jessewilliams
Level 1
Level 1
 
Posts: 5
Joined: Wed May 26, 2010 10:54 am

Linux Mint is funded by ads and donations.
 
Next

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 11 guests