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 12:41:15 +0200 [thread overview]
Message-ID: <20080530104115.GA21035@thorin> (raw)
In-Reply-To: <ca0f59980805291149t7239364eybee8103677bda839@mail.gmail.com>
On Fri, May 30, 2008 at 02:49:22AM +0800, Bean wrote:
> On Fri, May 30, 2008 at 2:17 AM, Robert Millan <rmh@aybabtu.com> wrote:
> > On Fri, May 30, 2008 at 12:50:42AM +0800, Bean wrote:
> >>
> >> BTW, I think we can embed the UUID of the root device in
> >> core.img/grub.elf, so that when the traditional root device fails to
> >> locate normal.mod, it uses the UUID to scan for root device.
> >
> > Good idea. But I'd check for UUID first. When you find a UUID match, it's
> > much more reliable than a filename one.
>
> 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?
Maybe we could search for everything else in the same module too, this way
we only have to iterate once. It could check for things like:
- filesystem uuid
- partmap uuid (when we support it)
- filename (based on user input via variable, rather than hardcoded
normal.mod?)
- filesystem label
--
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 /.)
next prev parent reply other threads:[~2008-05-30 10:41 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 [this message]
2008-05-30 13:14 ` Robert Millan
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=20080530104115.GA21035@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.