Gentoo Archives: gentoo-user

From: thegeezer@×××××××××.net
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] grub2 defaults
Date: Wed, 26 Mar 2014 16:19:12
Message-Id: 679b9b8772bc9b6aafdc068a4b7c9a03@thegeezer.net
In Reply to: [gentoo-user] grub2 defaults by James
1 On , James wrote:
2 > Howdy,
3 >
4 > So I have these entries in my /etc/default/grub file:
5 >
6 > GRUB_DISTRIBUTOR="Gentoo"
7 > GRUB_DEFAULT=kernel-3.13.6-gentoo
8
9 I don't think this will work -- it is the title of menu entry you need
10 not the kernel executable
11
12 > GRUB_HIDDEN_TIMEOUT=3
13 > GRUB_TIMEOUT=10
14 > GRUB_GFXMODE=1024x768
15 >
16 > I ran 'grub2-mkconfig -o /boot/grub/grub.cfg'
17 > after the last ebuild of 3.13.6-gentoo
18 >
19 >
20 > /boot shows:
21 > kernel-3.13.0-gentoo
22 > kernel-3.13.0-gentoo-r1
23 > kernel-3.13.1-gentoo
24 > kernel-3.13.6-gentoo
25 > kernel-3.13.6B-gentoo
26 > kernel-3.13.7-gentoo
27 >
28 >
29 > Obviously, I like to kept kernel experiments around a while....
30 >
31 > So when I get the Grub2 (ascii) boot menu and just select the
32 > default, it boots kernel-3.13.7-gentoo, despite
33 > 'kernel-3.13.6-gentoo' being set in as the default for Grub2?
34 >
35
36 Grub2 seems to do things a little differently.
37 I've been working through my list especially for headless and failed
38 boots.
39 you want in /etc/default/grub
40 GRUB_DEFAULT=saved
41 GRUB_SAVEDEFAULT=true
42
43 just an aside if you are going headless you want GRUB_SAVEDEFAULT=false
44 especially for a fallback boot option. if you don't want the selection
45 just booted to become the default, you set this to false.
46
47 once you have that you can then
48 # grub2-set-default 'Gentoo GNU/Linux, with Linux x86_64-3.13.6-gentoo'
49
50 it would be nice if there was a way of getting id menu numbers.
51 i've not looked into the grub2-mkconfig but i get a menu with a single
52 default option and advanced options wiht previous kernels listed in
53 there.
54 id numbers would not work too well with sub menus, but i recently had a
55 message from grub saying that because my default option had been moved
56 to the advanced option it should be amended to be
57 # grub2-set-default
58 'gnulinux-x86_64-3.12.13-gentoo-advanced-a48a107b-c379-4c72-bcda-25011968eab5'
59
60
61 also for booting an option once, on the next reboot you can use
62 # grub2-reboot 'GNU/Linux, with Linux x86_64-6.13.6-gentoo'
63
64 afaik if your kernel/initramfs use custom names e.g. PeterRabbit-vmlinuz
65 with PoohBear-initramfs grub2-mkconfig doesn't work for you, so make
66 sure your files conform.
67
68
69 > Comment thoughts and suggestions, including deeper reading on grub2
70 > is most welcome, particulary Grub2 examples.
71 >
72 > Also, is there a nice 'gui' boot-menu for grub2 ?
73 >
74 > It seems to take several repeated attemps for grub2 to correctly
75 > use the kernel I desire, despite what syntax/order I use.
76 > If I boot a kernel that is not the default, it takes about 2 minutes,
77 > then another 2 minutes of blank screen then it boot fairly quickly.
78 > The mobo is a GA-99FXA-UD3 and this might not have the bios/uefi/???
79 > optimally configured? (first gigabyte moble).
80 >
81 > The is what I have read on grub2 (man pages, gentoo wiki) so additional
82 > reading, with some useful examples would also be much appreciated.

Replies

Subject Author
[gentoo-user] Re: grub2 defaults James <wireless@×××××××××××.com>