help-grub
[Top][All Lists]
Advanced

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

Re: Locating a configuration file (*.cfg)


From: Andrei Borzenkov
Subject: Re: Locating a configuration file (*.cfg)
Date: Fri, 30 Oct 2015 18:25:07 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

30.10.2015 15:37, Arbiel (gmx) пишет:

2) Having located the configuration file to branch to, configfile allows
for the branching of grub to that file. How does configfile handle the
${config_directory} variable ? If this variable is not set to this "new"
grub directory, how is it possible to deduce the name of this directory
from the fully qualified name of the "new" configuration file ?

config_directory and config_file should be set to the correct value
when entering new configuration file. If not, please report together
with instructions how to reproduce.
a) I never saw any reference to config_file, neither in the
documentation, nor my configuration files. What value is it supposed to
hold ?

The name of configuration file that is being processed using "configfile" command. I actually was sure I documented them but apparently patch stuck. I need to do it.

b) are those two variables to be exported ?


GRUB does it.

3) To complement this grub script, I want to write a bash script to set
a environment variable which the grub script has to reset. grub seems to
not support save_env to a grubenv file located on a logical volume. Is
it possible to replace the load_env and a save_env commands by
identically named functions which would use these 2 commands with the -f
parameter (and doing so, would allow for the correct operation of
recordfail) ?

There is no support for writing on top of diskfilter devices - LVM,
Linux MD etc. It may be possible to implement limited support for
linear and RAID0 type of storage. Anything else is too complicated to
warrant doing it. I would be happy if someone could suggest
implementation that allowed environment block to be located anywhere,
not only as file on a filesystem. openSUSE does something similar for
btrfs as special case.
My question was maybe not clear enough. I meant in "to replace load_env …"
writing in my script sort of an alias to overwrite the commands.


Can you "replace write system call" to write to a file system that is mounted read-only?

On another hand, wouldn't it be possible to add a parameter to
grub-mkconfig to define a write-eligible environment block and reference
it in the various "load_env" et "save_env" used by grub.cfg ?


How are you going to identify device where this block is located?



reply via email to

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