Re: Configure GRUB 2
On 08/11/2012 13:50, Darac Marjal wrote:
On Thu, Nov 08, 2012 at 12:47:28PM +0000, Darac Marjal wrote:
On Thu, Nov 08, 2012 at 01:40:37PM +0100, firstname.lastname@example.org wrote:
If you don't want to boot the previous kernel, but a specific one
(known to work), cat the /boot/grub/grub.cfg and locate the entry of
the kernel you want as a default. What you want is the part
immediately following the "menuentry" stanza, usually in between
single quotes (you don't need the whole line. Here is and example
grub.cfg menu entry:
menuentry 'Debian GNU/Linux, avec Linux 3.2.0-3-amd64 [...]
You would need to put the following entry in /etc/default/grub:
GRUB_DEFAULT='Debian GNU/Linux, avec Linux 3.2.0-3-amd64'
Then execute "update-grub".
I think this is a bad idea outside of a temporary test situation, if
you forget such a hack you'll be booting an old kernel possibly
vulnerable or troublesome as the default one. The config will also
break when this specific kernel version is removed by the package
A couple of points.
GRUB_DEFAULT takes a menu, not a title.
Bah, I meant it takes a NUMBER, not a title. So your first kernel is 0,
you probably then have the same kernel in emergency mode as 1, the next
kernel as 2 and so on.
Using a Title works in /etc/default/grub for the grub version currently
in Wheezy/Sid, it will change with version 2 when the menu entries will
be split between default and advanced.
Using a menuentry title is also supposed to work with grub-reboot too,
but doesn't always in my experience despite the manual saying:
"ENTRY is a number or a menu item title."