[Top][All Lists]

[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: Sat, 7 Nov 2015 09:06:04 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

07.11.2015 00:25, Arbiel (gmx) пишет:

Le 30/10/2015 16:25, Andrei Borzenkov a écrit :
30.10.2015 15:37, Arbiel (gmx) пишет:

3) To complement this grub script, I want to write a bash script to
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 suggestion would be : not really anywhere, but in core.img. I

a) this just changes the question to "how do you find location of core.img"
b) there could be any number of core.img located anywhere and all accessing the same /boot/grub. They all must see the same environment block belonging to their /boot/grub, which effectively defines *the* installed grub instance.

understand this would increase core.img's size by one block, which could
be a major drawback for older system. So, the inclusion of the
environment block into core.img should be controlled by a
"--grubenv-incore" parameter in grub-install. And this parameter could
also be discarted if there is not enough available room.
grub's load_env and save_env commands, linux grub-install and
grub-editenv commands should be the only ones to be modified.
If this suggestion fits you, I'm sure you will find a way to assume
compatibility with the current situation.

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?
I do not understand your question.

GRUB diskfilter device is read-only. Period. It does not matter how command is named - *no* command is able to write on diskfilter.

reply via email to

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