grub-devel
[Top][All Lists]
Advanced

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

Re: comments about /etc/default/grub


From: Franklin PIAT
Subject: Re: comments about /etc/default/grub
Date: Tue, 12 Feb 2008 21:54:15 +0100

On Tue, 2008-02-12 at 12:47 +0100, Robert Millan wrote:
> On Tue, Feb 12, 2008 at 09:32:03AM +0100, Franklin PIAT wrote:

> > The variable GRUB_DEFAULT seems to be counted from 0 currently. Couldn't
> > it be changed to count from 1.
> 
> But why?  :-)

Human brain usually starts counting at 1 ;)

You will probably oppose "It's already a big leap to migrate from GRUB
Legacy to GRUB 2;  I suggest we don't make it bigger yet."
Which would be a good argument not to change that behaviour.


> > Could we add some comments, within /etc/default/grub (especially
> > GRUB_CMDLINE_LINUX, since many people will use it).
> 
> Fine with me.  Note, however, that this file started being provided as
> distro-specific (official GRUB doesn't ship it), and at least one of its
> variables (GRUB_DISTRIBUTOR) is.
> 
> I suppose a distro-agnostic template should really be added, but I didn't
> find an ellegant way to solve the GRUB_DISTRIBUTOR "problem".

I would love to remove GRUB_DISTRIBUTOR from the /etc/default/grub file,
since it's a user configuration file.

Couldn't GRUB_DISTRIBUTOR be set in /util/update-grub.in (just before
the line where ${sysconfdir}/default/grub is sourced)


> For other reasons, I was thinking in a directory (let's call it
> /etc/grub.source.d/) where add-ons are sourced rather than executed.  This
> was in fact my initial motivation when writing update-grub (sigh ;-)).  My
> idea was that specific programs could put POSIX sh scripts, for example with
> things like:
> 
>   GRUB_CMDLINE_LINUX="${GRUB_CMDLINE_LINUX} foo=bar"

There could be some file like "/etc/grub.d/C05_foo" where the "C" range
is reserved for "pre-configure". It could be generalized :
 "/etc/grub.d/H05_foo" => Header
 "/etc/grub.d/M05_foo" => Menu entries
 "/etc/grub.d/F05_bar" => Footer (???)
Or we could use subfolders, rather than letter prefix (like exim which
has /etc/exim4/conf.d/auth,  /etc/exim4/conf.d/transport ...)

But right now, _I_ don't know if we need such complexity.

> in case a specific Linux parameter is preferred for running such program.
> 
> This would also solve the GRUB_DISTRIBUTOR problem simply by setting that
> variable from /etc/grub.source.d/xx_debian or so:
> 
>   GRUB_DISTRIBUTOR=Debian


Franklin





reply via email to

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