On Sun, Oct 9, 2016 at 12:05 PM, William Hubbs <willi...@gentoo.org> wrote:
> On Sun, Oct 09, 2016 at 03:45:11AM +0100, M. J. Everitt wrote:
>> On 09/10/16 00:57, Ben Kohler wrote:
>>> On Sat, Oct 8, 2016 at 9:28 AM, Tom H <tomh0...@gmail.com
>>> <mailto:tomh0...@gmail.com>> wrote:
>>> On Tue, Oct 4, 2016 at 11:34 PM, William Hubbs
>>> <willi...@gentoo.org <mailto: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/".
>>>
>>> Well "grub2-mkconfig" by itself doesn't write anywhere unless you pass
>>> a -o parameter. If you are "accidentally" running "grub2-mkconfig -o
>>> /boot/grub/grub.cfg" and it catches you by surprise that
>>> /boot/grub/grub.cfg is overwritten, you have bigger problems.
>>>
>>> Let's not make up problems where there are none.
>>
>> +1
>
> +1000

I was sharing what I do because I've overwritten a manually-edited
grub.cfg by running grub-mkconfig/grub2-mkconfig/update-grub (re
grub2-mkconfig, I use grub-mkconfig on Gentoo because I set
"-multislot") more than once - and I know other sysadmins who've made
the same mistake.

You can use exactly the same text in 40_grub that you'd use in
grub.cfg and have the latter generated. I don't see why anyone would
be opposed to that, unless you hate that tool - and hate's never a
good rationale for an MO.

Reply via email to