[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Full documentation for GRUB2

From: address@hidden
Subject: Re: Full documentation for GRUB2
Date: Thu, 31 Mar 2011 08:59:05 -0500

> I've wondered occasionally whether it would be worth it to include
> something like GRUB_STATIC in upstream grub-mkconfig; if set, this would
> cause grub-mkconfig to do nothing, perhaps printing a message.  This
> would mean you wouldn't have to figure out how to disable distribution
> facilities that run grub-mkconfig for you; you could just set
> GRUB_STATIC=1 and write your own grub.cfg if you wanted.  Vladimir, do
> you think you'd take such a change for 1.99?

Based on other messages in this thread, this likely wouldn't be very
effective.  Boot from a LiveCD?  It won't have GRUB_STATIC set.

IMO, a better option would be to control this from the config file
itself (and obviously it's already too late from one perspective,
there already exist distro releases with tools that won't respect it).

I would lean toward a solution wherein the tools refuse to modify a
config that contains any of

config_protected 1
config_protected yes
config_protected true

(and prints an appropriate message so a user who is trying to run a
boot fix-it tool is informed how to disable the protection, better
have a specific exit code as well so that wrapper tools which don't
show tool stdout/stderr to the user can detect this condition and
display their own message, possibly localized)

Then the tools can generate a config that starts with

# this file is auto-generated, allow re-generation (manual edits will be lost)
config_protected false

Any user who opens the config in an editor should understand that a
change needs to be made to switch off auto-generation, they can most
likely infer the syntax they want or go read the documentation.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]