From: Pavel Roskin <proski@gnu.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: Proposal for savedefault implementation
Date: Sat, 22 Mar 2008 02:36:58 -0400 [thread overview]
Message-ID: <1206167819.22775.46.camel@dv> (raw)
In-Reply-To: <ca0f59980803210431gb9c4b74i74b1c1301d881943@mail.gmail.com>
On Fri, 2008-03-21 at 19:31 +0800, Bean wrote:
> Hi,
>
> I'm think about the following implementation, please see if it's all right.
>
> Config information is saved in a file named `defaults' in the grub
> directory, it's format is something like this:
It would be great not to hardcode the name, or at least make it possible
to override the name.
> GRUBENV \0
> key1=value1 \0
> key2=value2 \0
> ...
> keyN=valueN \0 \0
>
> This file should be at least 8192 bytes, this should be ok for most file system.
Why this number? Is it to avoid some filesystem issues, like tail
packing? Or is it just to ensure that there is enough space for the
variables?
> In grub2, we use load_exports to load global variables, and
> save_exports to save them. For example:
>
> load_exports
>
> menuentry "aa" {
> default=0
> export default
> save_exports
> }
It feels too verbose to me. I think "export default=0" could do all
three operations at once. Also, "default" or some other variable should
be set to the menu entry number automatically, so that the entries don't
need to be renumbered every time.
> we can also add a new tool such as grub-editenv to edit the config
> file.
Maybe I'm too obsessed with safety, but that tool should also check that
the "default" file is located in a place that is safe for GRUB to use.
--
Regards,
Pavel Roskin
next prev parent reply other threads:[~2008-03-22 6:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-20 8:09 Proposal for savedefault implementation Pavel Roskin
2008-03-20 12:28 ` Bean
2008-03-20 16:26 ` Pavel Roskin
2008-03-21 8:57 ` Bean
2008-03-21 11:31 ` Bean
2008-03-22 6:36 ` Pavel Roskin [this message]
2008-03-22 7:23 ` Bean
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1206167819.22775.46.camel@dv \
--to=proski@gnu.org \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.