All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] Environment block support for grub2
Date: Sat, 31 May 2008 12:10:42 +0200	[thread overview]
Message-ID: <20080531101042.GF6619@thorin> (raw)
In-Reply-To: <ca0f59980805301327w7a5aa4c3n2b15777a15ef9032@mail.gmail.com>

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	other threads:[~2008-05-31 10:10 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-30 20:27 [PATCH] Environment block support for grub2 Bean
2008-05-31 10:10 ` Robert Millan [this message]
2008-05-31 10:54   ` Bean
2008-05-31 11:39     ` Robert Millan
2008-05-31 12:09       ` Bean
2008-05-31 15:09         ` Bean
2008-06-03 21:09           ` Robert Millan
2008-06-04  3:49             ` Bean
2008-06-06 16:43               ` UUID-based boot (Re: [PATCH] Environment block support for grub2) Robert Millan
2008-06-06 17:22                 ` Bean
2008-06-06 22:03                   ` Robert Millan
2008-06-07  4:33                     ` Bean
2008-06-08 19:26                       ` Robert Millan
2008-06-07  7:24                     ` Vesa Jääskeläinen
2008-06-06 23:31                   ` [PATCH] ntfs UUIDs (Re: UUID-based boot (Re: [PATCH] Environment block support for grub2)) Robert Millan
2008-06-07  5:44                     ` Tomáš Ebenlendr
2008-06-08  3:34                       ` Pavel Roskin
2008-06-08 19:19                         ` Robert Millan
2008-05-31 15:21         ` [PATCH] Environment block support for grub2 Robert Millan
2008-06-13 22:48           ` Yoshinori K. Okuji
2008-06-14  3:41             ` Bean
2008-06-14 18:32               ` Robert Millan
2008-06-14 19:22                 ` 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=20080531101042.GF6619@thorin \
    --to=rmh@aybabtu.com \
    --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.