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.
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 ?
What do you think ?
Le 09/04/2012 20:40, Jordan Uggla a écrit :
On Mon, Apr 9, 2012 at 6:20 AM, Arbiel Perlacremaz
<[email protected]> wrote:
Thank you Jordan
It works perfectly after I have added
set prefix=${2}/boot/grub
export prefix
$prefix is where grub looks for its modules, you should never be
changing it yourself in scripts because if you change $prefix to point
to an older (or newer) grub's /boot/grub/ directory the modules in
that directory will likely be incompatible. The example menu entry I
gave should have worked, did it not work?
_______________________________________________
Help-grub mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-grub