Re: Configure GRUB 2
On 08/11/2012 11:25, Lisi Reisz wrote:
On Thursday 08 November 2012 08:58:03 firstname.lastname@example.org wrote:
Thank you! I hadn't found references to /etc/grub/40.
I already corrected that, but for the sake of future references the
correct path is: /etc/grub.d/
Yes, sorry. I now (I hope!) understand the principle, but not the nitty
gritty. At least I now know what to Google.
There really isn't much to do for what you want to achieve besides
adding GRUB_DEFAULT=1 to /etc/default/grub and executing "update-grub".
Note that every entry count as one (failsafe, memtest ...), so to know
what number you need to use look into /boot/grub/grub.cfg and count the
number of "menuentry" blocks before the one you want as a default.
Custom entries are special cases where os-prober doesn't work, like
booting from an .iso file somewhere on the disk, or an flash disk which
isn't permanently connected.
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 manager.
I don't remember if you mentioned the Debian version you are using, but
in wheezy/Sid there is a graphical application dubbed "startupmanager"
allowing to edit you grub config from a graphical interface, including