Gentoo Archives: gentoo-user

From: Rich Freeman <rich0@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Human configurable boot loader, OR useful grub2 documentation
Date: Fri, 05 Jul 2019 14:05:17
Message-Id: CAGfcS_==sSDy6KFuXObqN47qA9OyFtmswBdC3bPjWXKJkVFZng@mail.gmail.com
In Reply to: Re: [gentoo-user] Human configurable boot loader, OR useful grub2 documentation by Mick
1 On Fri, Jul 5, 2019 at 4:10 AM Mick <michaelkintzios@×××××.com> wrote:
2 >
3 > On Friday, 5 July 2019 08:24:14 BST mad.scientist.at.large@××××××××.com wrote:
4 > > Thank you! Now I don't have to read all the grub2 manual right away.
5 >
6 > You could create manually a /boot/grub/grub.cfg file, but this is NOT how
7 > GRUB2 was meant to be used. TBH, if you want to do this, then why bother with
8 > GRUB2 in the first place. You could instead install sys-boot/grub-static from
9 > an overlay and use grub legacy by manually configuring its /boot/grub/
10 > grub.conf file.
11
12 The only people who would tell you not to use a manual config would
13 also tell you not to use the old version of grub. There is really no
14 reason to use the old version, except for the fact that the
15 documentation for manual config files on the new one is pretty opaque.
16
17 The newer version is much more versatile in terms of support for newer
18 filesystems, etc. It just has a preferred mode of operation that
19 basically generates config files that are practically a bootloader in
20 themselves. The old version isn't even in the Gentoo repo, which
21 means that if you do run into problems you'll be using backchannel
22 support. Given that somebody just posted a ready-to-use config file
23 I'd start there.
24
25 All that said, it probably is worth taking the time to see if you can
26 bend to the tool rather than making the tool bend to you. If you use
27 the standard make install kernel filenames, and edit the grub config
28 files in /etc appropriately, chances are it will generate a nice menu
29 that just works. I used to do it the way you're looking to do it, but
30 find that the tools work pretty well these days and it makes it
31 trivial to maintain a library of old kernel versions which has helped
32 out with the occasional regression.
33
34 While the autogen config files are a bit complex, they are actually
35 editable and readable. If you skip through all the conditional logic
36 you'll get to the guts of the actual menu options. You can always
37 autogen a config and not send the output to the actual config file if
38 you want to see what it wants to do for reference.
39
40 --
41 Rich

Replies

Subject Author
Re: [gentoo-user] Human configurable boot loader, OR useful grub2 documentation Grant Taylor <gtaylor@×××××××××××××××××××××.net>