[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Proposal for savedefault implementation
From: |
Bean |
Subject: |
Re: Proposal for savedefault implementation |
Date: |
Fri, 21 Mar 2008 19:31:55 +0800 |
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:
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.
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
}
menuentry "bb" {
default=1
export default
save_exports
}
we can also add a new tool such as grub-editenv to edit the config file.
--
Bean