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: Robert Millan
Subject: Re: [PATCH] Environment block support for grub2
Date: Sat, 31 May 2008 12:10:42 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

On Sat, May 31, 2008 at 04:27:31AM +0800, Bean wrote:
> Hi,
> 
> This patch add environment block support, which can be used to locate
> root device using uuid or label.

Nice :-)

> The previous prefix is stored in variable rdir.

Do we need this?

> Different platform use grub_machine_get_envblk to return a pointer to
> the name=value area of environment block. In main.c, it uses
> grub_parse_envblk to walk through the list and assign values to
> variables.
> 
> I also replace grub_machine_set_prefix with grub_machine_set_root. As
> it seems strange to compute the prefix in grub_machine_set_prefix, and
> then split it in grub_set_root_dev to get the root device. Now,
> grub_machine_set_root set the root directly, and in grub_set_root_dev,
> it uses root and rdir to generate the prefix.

Note that root and prefix don't necessarily have to point at the same device.

prefix always points at the directory containing GRUB modules etc, and is
needed at initial stage.  root is used later on by grub.cfg to access our
payload (I think our current use of root to initialise prefix is gratuitous
and could better be avoided).

Since for initialising root we don't have any problem, as we can use all
the fancy stuff grub.cfg allows, unless I missed something I think it's
better if at this stage we just focus on prefix.

> grub-mkimage will initialize the environment block with one item:
> rdir=/boot/grub
> 
> Second, use grub-editenv to set the uuid or label of the root device.
> For example:

Would it be simpler if grub-mkimage embedded an initialised environment
block directly?

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What good is a phone call… if you are unable to speak?
(as seen on /.)




reply via email to

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