Gentoo Archives: gentoo-user

From: Grant Edwards <grant.b.edwards@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: Human configurable boot loader, OR useful grub2 documentation
Date: Tue, 09 Jul 2019 19:53:41
Message-Id: qg2rbj$277q$1@blaine.gmane.org
In Reply to: [gentoo-user] Re: Human configurable boot loader, OR useful grub2 documentation by Ian Zimmerman
1 On 2019-07-09, Ian Zimmerman <itz@××××××××××××.org> wrote:
2 > On 2019-07-05 14:25, Grant Edwards wrote:
3 >
4 >> -----------------------------grub.cfg------------------------------
5 >> timeout=10
6 >> root=hd0,1
7 >>
8 >> menuentry 'vmlinuz-4.19.52-gentoo' {
9 >> linux /boot/vmlinuz-4.19.52-gentoo root=/dev/sda1
10 >> }
11 >>
12 >> menuentry 'vmlinuz-4.14.83-gentoo' {
13 >> linux /boot/vmlinuz-4.14.83-gentoo root=/dev/sda1
14 >> }
15 >> -------------------------------------------------------------------
16 >>
17 >> I shudder when I contrast that with many hundreds of lines of cruft
18 >> that the mkconfig system would generate.
19 >
20 > This is an overstatement
21
22 To be fair, I should state that I've never used the autoconfig stuff
23 on that particular system. When I converted from grub-legacy to
24 grub2, I just translated the old grub config file to the new syntax.
25
26 > matica!2 ~$ wc -l /boot/grub/grub.cfg
27 > 148 /boot/grub/grub.cfg
28
29 That's still a 15:1 ratio. It appears that Gentoo is a better than
30 some other distros. On a fairly simple Ubuntu server system with 3
31 kernel versions:
32
33 wc -l /boot/grub/grub.cfg
34 265 /boot/grub/grub.cfg
35
36 On other distros/machines I've often seen double or triple that using
37 the installation defaults. You _really_ don't want to see the auto
38 generated grub.cfg files on a machine with a dozen different linux
39 installations, each with several kernels. Unless you disable the OS
40 probing module, it gets bad.
41
42 > 2 kernels, no initrd, just like yourself.
43 >
44 > Maybe you do need to take a look at /etc/default/grub ?
45
46 If you spend some time tuning things in /etc/default/grub, it gets
47 better. But, for my Gentoo systems I still find it far less work to
48 just create a grub.cfg file manually.
49
50 The semantics of /etc/default/grub also seem to vary to an annoying
51 extent between distros and versions. The semantics of grub.cfg seem
52 to be far more stable.
53
54 --
55 Grant Edwards grant.b.edwards Yow! Were these parsnips
56 at CORRECTLY MARINATED in
57 gmail.com TACO SAUCE?