[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 13:46:05 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
07.11.2015 13:25, Arbiel (gmx) пишет:
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"
I suppose your question to concern boot-time (load_env and save_env), as
bootinfoscript perfectly knows where core.img is located. Couldn't a
Both boot time and run time need to find it.
grub variable (grubenv_location) be defined and set by core to hold this
information, as do prefix and config_dirertory.
Prefix and config are identified by filesystem UUID (or file with unique
file name). How do you identify raw disk location?
I really believe that there are two types of environment variables, the
ones which are only read by grub (users may wish to pass permanent
information to grub) and the ones which are intended to transfer
information from one run of grub to the next one (next_entry,
recordfail,…).
Environment block only serves to pass information between grub
invocations or between OS and GRUB.
All environment variables should remain listed in grubenv, but their
This is unfortunate confusion in using "environment" both for internal
GRUB variables and external environment block. GRUB variables are not
stored anywhere - they exist only when GRUB is running. Some of them may
be initialized from environment block. Some of them from $prefix
core.img section or by embedded config script.
value could be either in grubenv, as for now, and for "permanent"
variable, or in core.img, as I suggest, for "transient" ones. There are
many ways to implement such a mecanism.
There is no need or reason to store "transient" variables anywhere. They
are stored in RAM when GRUB runs and are not required or needed after
GRUB finished.
By the way, how is "recordfail" reset to 0 ?
This variable does not exist upstream so you need to ask your distro
which probably added it. I do not know what it does. Which distro is it?
- Re: Locating a configuration file (*.cfg), Arbiel (gmx), 2015/11/06
- Re: Locating a configuration file (*.cfg), Andrei Borzenkov, 2015/11/07
- Re: Locating a configuration file (*.cfg), Arbiel (gmx), 2015/11/07
- Re: Locating a configuration file (*.cfg),
Andrei Borzenkov <=
- Re: Locating a configuration file (*.cfg), Arbiel (gmx), 2015/11/07
- Re: Locating a configuration file (*.cfg), Arbiel (gmx), 2015/11/07
- Re: Locating a configuration file (*.cfg), Andrei Borzenkov, 2015/11/07
- Re: Locating a configuration file (*.cfg), Arbiel (gmx), 2015/11/07
- Re: Locating a configuration file (*.cfg), Andrei Borzenkov, 2015/11/08