grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Environment block support for grub2


From: Bean
Subject: Re: [PATCH] Environment block support for grub2
Date: Sat, 31 May 2008 23:09:43 +0800

Hi,

This is the new patch, it contain the following changes:

1. command edit -> set in grub-editenv, as it seems more natural.

grub-editenv FILE set name=value ...

2. findroot can locate the root device using filename. To use it, just
set idfile to any file inside the directory, For example:

idfile=normal.mod

Scan preference: uuid > label > idfile

3. Change the order device are reported in biosdisk, so that floppy appear last.

4. Add new command loadenv, which can be used to load/save environment variable.

load_env [-f FILE]
Load environment variable from external environment block file. The
default file is $prefix/grubenv, but you can overwrite it with -f
parameter.

list_env  [-f FILE]
List the variables in external environment block file.

save_env [-f FILE] variable_name ..
Save the value of variable_name to external environment block file

So, to archive the effect of savedefault command in grub legacy, you can use:

load_env
..

menuentry aa {
..
save_env default
}

You can also use save_env to save the variable directly to core.img,
but it's not recommended. The environment block inside core.img is
quite small, it's mainly used to store critical variable like rdir,
uuid, label and idfile.

-- 
Bean

Attachment: envblk_2.diff
Description: Text Data


reply via email to

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