On Sat, Jan 25, 2014 at 11:18 AM, Graham Murray <[email protected]> wrote:
> Andrés Becerra Sandoval <[email protected]> writes:
>
>> If you put the kernels in /boot with proper names and launch:
>>
>> grub2-mkconfig -o /boot/grub/grub.cfg
>>
>> Grub will set up the kernels for you.
>
> How do you then choose which one to boot by default? I normally run
> hardened-sources but also want to occasional boot (eg test) the latest
> gentoo-sources kernel which is often a higher version than the latest
> hardened one. So I might have (in /boot)
>   vmlinuz-3.12.6-hardened-r4
>   vmlinuz-3.12.8-hardened
>   vmlinuz-3.12.8-hardened-r1
>   vmlinuz-3.13.0-gentoo-r1
>
> grub2-mkconfig will set the highest version as the default (ie without
> manual menu selection) to boot. I would like to configure it so that the
> default is the latest -hardened.
>

Overriding the default is a bit tricky. grub-mkconfig generates
submenus by default, so you end up having to do something like this in
/etc/default/grub:

GRUB_DEFAULT=""gnulinux-advanced-508868e4-54c6-4e6b-84b0-b3b28b1656b6>gnulinux-3.10.9-advanced-508868e4-54c6-4e6b-84b0-b3b28b1656b6"

Thats "gnulinux-advanced-508868e4-54c6-4e6b-84b0-b3b28b1656b6",
followed by a ">", and then
"gnulinux-3.10.9-advanced-508868e4-54c6-4e6b-84b0-b3b28b1656b6". The
former is the submenu id, and the latter is the menuentry within the
submenu.

I believe there will be a way to shut off the submenu stuff in
grub-2.02, which is in beta now.

Reply via email to