[Top][All Lists]

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

Re: Activating a configuration file within a submenu or a menuentry

From: Jordan Uggla
Subject: Re: Activating a configuration file within a submenu or a menuentry
Date: Mon, 9 Apr 2012 20:41:12 -0700

On Mon, Apr 9, 2012 at 3:18 PM, Arbiel Perlacremaz
<address@hidden> wrote:
> Oh, yes, the example menuentry you gave me works perfectly, and I thank you
> for that. I've been able to have grub executing each selected grub.cfg file.
> The trouble arises from the fact that these grub.cfg files each use their
> specific ${prefix} variable. And these variables are used in particular to
> "source" the ${prefix}/custom.cfg file if it exists.
> So, to get the menu as if the PC had been booted by the grub's instance
> which refers to one of the other_cfg files, I have to set prefix =
> ${2}/boot/grub, the directory which I have Grub read the grub.cfg file, and
> export it to have it available in that subsequent configfiled grub.cfg file.
> Obviously, difficulties may arise, as you have stated, when all Grub
> instances of a given configuration are not at the same level, which is
> presently not the case in my configuration.
> However, this shows a design pitfall : Grub uses a single variable for two
> different purposes : accessing its own modules and accessing user defined
> files. It should use two variables.

This is a problem which I hadn't considered, and I will file a bug
report about it when I get the time.

> However, the use of two variables may not be enough to clear the issue.
> Wouldn't we face inconsistencies if the grub version current when a user
> runs grub-mkconfig is not the same as the one which was current when he
> previously ran the grub-install procedure ?

This is a problem which has been taken into consideration with every
update of grub-mkconfig. We try to generate a grub.cfg which will
degrade gracefully with older versions of grub, and try not to make
changes to grub's syntax which would break older configs.

Jordan Uggla (Jordan_U on

reply via email to

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