[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Booting from newly installed Kernel package?

On Wed, Mar 31, 2010 at 05:01:03 +0100, Jen wrote:
> I am blind, so selecting the kernel from the grub prompt is not
> possible. I want to use the new kernel (not trunk) as my default.

OK, now I understand your problem. It is unfortunate that the trunk
version slipped into the normal repository and that update-grub is not
prepared to deal with it automatically now that you have a newer regular
kernel installed.

> The speech and Braille modules that I use are loaded after the grub
> prompt has appeared, so I need to change what kernel is used after
> the system is booted.

The procedure to achieve that depends on your version of grub
(grub-legacy or grub-pc).

For grub-legacy you need to edit the file /boot/grub/menu.lst. There
should be a line "default 0", which tells grub which entry to boot by
default; counting starts from zero. You have to replace the 0 by a 1 or
a 2, depending on whether you have an auto-generated "recovery mode"
entry for the trunk kernel before the newer regular kernel. You can find
the current order of kernels at the end of the menu.lst file, in the
section starting below the line "## ## End Default Options ##". 

If you have difficulties finding out which number your desired entry has
then you can run the following command as root to obtain an ordered
listing of all menu entries:

grep ^title /boot/grub/menu.lst

I suggest making a backup of menu.lst before you edit it and running
"update-grub" after you changed the default. Once you manage to boot
into the new kernel, you can remove the trunk one and reset the default
to 0. (The entries of the trunk kernel will be removed automatically
from the grub menu when this kernel is uninstalled.)

The procedure for grub-pc follows the same principle, but in that case
you have to change the line "GRUB_DEFAULT=0" in the file
/etc/default/grub, or you can use the "grub-set-default X" command as
root, where "X" is the number of your desired new default.  Again, run
"update-grub" afterwards to make sure the change is committed.

Here is the command for obtaining an ordered listing of the menu entries
of grub-pc:

grep -o '^menuentry.*"' /boot/grub/grub.cfg

Regards,            |
          Florian   |

Reply to: