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 14:20:20 +0300

On Fri, Oct 30, 2015 at 2:02 PM, Arbiel (gmx) <address@hidden> wrote:
> Hi
>
> I want to write a grub script to locate a configuration file to branch
> grub to. This raises some issues
>
> 1) When --boot-directory of install-grub points to a logical volume,
> --force-file-id seems not supported as no configuration file is embedded
> in core.img. Does grub support searching into such a volume, assuming
> the lvm module has been loaded ? And what kind of search does it
> implement (uuid, label, file) ?
>

search command just looks at every available storage device. As long
as drivers for it are loaded and logical volume is present in list of
storage devices search should work.

> 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.

> 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.



reply via email to

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