Tom H posted on Sat, 08 Oct 2016 10:28:05 -0400 as excerpted:

> On Tue, Oct 4, 2016 at 11:34 PM, William Hubbs <willi...@gentoo.org>
> wrote:
>>
>> You don't have to use grub-mkconfig. You can write /boot/grub/grub.cfg
>> by hand if you want, and it appears that the syntax is documented in
>> the grub info pages.
> 
> If you write "/boot/grub/grub.cfg" by hand and run grub-mkconfig by
> mistake, you'll wipe out your config. It's safer to write it to
> "/etc/grub.d/40_custom" and "chmod -x" the other files in
> "/etc/grub.d/".

Or simply install-mask grub-mkconfig, like I did, via package.env to 
avoid polluting INSTALL_MASK for everything. =:^)

In /etc/portage/package.env:

sys-boot/grub   pkg.env/installmask/grub

In /etc/portage/env/pkg.env/grub:

# don't use grub(2)-mkconfig at all

INSTALL_MASK="$INSTALL_MASK /etc/default /etc/grub.d grub2-mkconfig grub-
mkconfig"

PKG_INSTALL_MASK="$INSTALL_MASK"


Now that I'm thinking about it, it /would/ be kinda nice to have a USE 
flag that did that, tho.  Yeah, it's just a few arguably small files, but 
when the absence of those files means the absence of a potential fat-
fingering...

(Tho not mounting /boot by default helps reduce the fat-fingering 
chances, and having a backup /boot partition and grub installation on a 
second drive helps avoid both that being a huge problem, and grub-upgrade 
mishaps too...)

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


Reply via email to