Gentoo Archives: gentoo-dev

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: grub-2 configuration
Date: Sat, 08 Oct 2016 23:04:35
Message-Id: pan$3120d$f0440029$fc53ba08$6550c246@cox.net
In Reply to: Re: [gentoo-dev] grub-2 configuration by Tom H
1 Tom H posted on Sat, 08 Oct 2016 10:28:05 -0400 as excerpted:
2
3 > On Tue, Oct 4, 2016 at 11:34 PM, William Hubbs <williamh@g.o>
4 > wrote:
5 >>
6 >> You don't have to use grub-mkconfig. You can write /boot/grub/grub.cfg
7 >> by hand if you want, and it appears that the syntax is documented in
8 >> the grub info pages.
9 >
10 > If you write "/boot/grub/grub.cfg" by hand and run grub-mkconfig by
11 > mistake, you'll wipe out your config. It's safer to write it to
12 > "/etc/grub.d/40_custom" and "chmod -x" the other files in
13 > "/etc/grub.d/".
14
15 Or simply install-mask grub-mkconfig, like I did, via package.env to
16 avoid polluting INSTALL_MASK for everything. =:^)
17
18 In /etc/portage/package.env:
19
20 sys-boot/grub pkg.env/installmask/grub
21
22 In /etc/portage/env/pkg.env/grub:
23
24 # don't use grub(2)-mkconfig at all
25
26 INSTALL_MASK="$INSTALL_MASK /etc/default /etc/grub.d grub2-mkconfig grub-
27 mkconfig"
28
29 PKG_INSTALL_MASK="$INSTALL_MASK"
30
31
32 Now that I'm thinking about it, it /would/ be kinda nice to have a USE
33 flag that did that, tho. Yeah, it's just a few arguably small files, but
34 when the absence of those files means the absence of a potential fat-
35 fingering...
36
37 (Tho not mounting /boot by default helps reduce the fat-fingering
38 chances, and having a backup /boot partition and grub installation on a
39 second drive helps avoid both that being a huge problem, and grub-upgrade
40 mishaps too...)
41
42 --
43 Duncan - List replies preferred. No HTML msgs.
44 "Every nonfree program has a lord, a master --
45 and if you use the program, he is your master." Richard Stallman