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] UUID support
Date: Fri, 30 May 2008 15:14:53 +0200	[thread overview]
Message-ID: <20080530131453.GA962@thorin> (raw)
In-Reply-To: <20080530104115.GA21035@thorin>

On Fri, May 30, 2008 at 12:41:15PM +0200, Robert Millan wrote:
> > 
> > Here are some thought about how to store it. We can reuse the space
> > occupied by prefix. Instead of one variable, we use zero-end strings
> > like:
> > 
> > path=/boot/grub \0 uuid=xxx-xxx-xxxx \0 \0
> > 
> > We can also add other variable, for example, debug and default. debug
> > is useful as it can show message before grub.cfg is loaded, and
> > default is used to control the default menu entry. Other variable
> > should be set in grub.cfg, as space is quite limited here.
> > 
> > path=/boot/grub \0 uuid=xxx-xxx-xxxx \0 debug=all \0 default=1 \0 \0
> > 
> > The space need to expand slightly, I guess something about 100 byte is
> > more than enough. The whole block is prefixed by a magic number and
> > block length, so that it's easy to locate by utility.
> > 
> > This also solve the savedefault issue, we can add a command like this:
> > 
> > save_env /path_to_core.img variable_name ..
> > 
> > It finds the magic number, and store the value of selected variable in
> > the embedded environment block.
> 
> Then I suppose we could have a module that gets $uuid from environment and
> searches for it to set $prefix?

However, a problem with this is that it only works for i386-pc, untill we
define a way to store this for each variant.

Perhaps we could instead use memdisk to store it?  Rather than put a grub.cfg
in memdisk, which would require builtin normal.mod, we could put a simpler
file (let's call it 'env') with initial environment, in the binary format
you describe.  Does that work?

Then to support it in other platforms, we just need to implement memdisk in
them.

-- 
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-30 13:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-29 15:13 [PATCH] UUID support Robert Millan
2008-05-29 16:50 ` Bean
2008-05-29 18:17   ` Robert Millan
2008-05-29 18:49     ` Bean
2008-05-30 10:41       ` Robert Millan
2008-05-30 13:14         ` Robert Millan [this message]
2008-05-30 13:26           ` Bean
2008-05-30 14:07             ` Robert Millan
2008-05-30 11:04 ` Robert Millan

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=20080530131453.GA962@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.