PDA

View Full Version : [ubuntu] downgrading kernel or setting grub default kernel



chamstar
June 24th, 2008, 12:53 PM
I recently allowed update manager to install a new kernel which has broken X, ie. I can only get to command prompt on boot. I have a dual screen setup which took me a fair while to get working.

If I select the old kernel from GRUB everything is okay. Is there any way I can downgrade the kernel back to what it used to be? [Or maybe change the default kernel in GRUB?]

The same thing happened when I upgraded to Hardy, I'm currently on Feisty. When I have time I'll upgrade and get the dual monitors working again but for now I'm happy to stick to Feisty since it works well.

Many thanks, Cham.

Pumalite
June 24th, 2008, 01:16 PM
Maybe all you need with your new kernel is reinstalling your video driver

chamstar
June 24th, 2008, 02:06 PM
Maybe, but I tried for a couple of days to get nvida working with Hardy kernel a few weeks back. I don't have time at the moment to 'play' with it. I use Ubuntu for everyday work as a Ruby programmer. When I get more time I'll get it working, for now I just need to boot to a working kernel :) Cheers.

Pumalite
June 24th, 2008, 02:21 PM
All you have to do is choose the kernel you want to boot at the Grub menu. Or edit menu.lst and change default=0 for the corresponding number keeping in mind that Grub starts to count from 0.

sdennie
June 24th, 2008, 06:13 PM
An easy way to set the default is to edit /boot/grub/menu.lst:



gksudo gedit /boot/grub/menu.lst


Look for the line towards the top that says "default 0" and change it to "default saved". Then find the line towards the bottom of the huge comment block that says: "# savedefault=false" and change "false" to "true". Save the file and then run:



sudo update-grub


The next time you restart, whatever kernel you choose will be become the default for future restarts.

chamstar
June 26th, 2008, 02:30 PM
Cheers Vor, I just needed to change default to saved.

directcharitycontribution
November 9th, 2008, 11:06 PM
then how do user set absolute not relative default kernel?

sdennie
November 9th, 2008, 11:15 PM
Really, the instructions above are the equivalent of "absolute". Setting default to a number is like setting it to "relative". When it's at "saved" you will boot into the same kernel until you explicitly choose a different kernel in grub.

directcharitycontribution
November 9th, 2008, 11:32 PM
cool. that sounds nice simple. then what does happen with those new kernel?

d_singo69
November 12th, 2008, 10:20 AM
Thanks for the info Vor It solved the problem of a kernel hiccup

directcharitycontribution
November 12th, 2008, 06:03 PM
http://ubuntuforums.org/showthread.php?t=215203

pkkid
February 14th, 2010, 07:25 AM
This helped solve my problem as well with a recent kernel for the Macbook Pro.

I found that I could set "GRUB_DEFAULT=saved" in the file /etc/default/grub. This means that each time grub loads, the default selected option will be whatever you choose last. Don't forget to run update-grub after you make the change.