[Top][All Lists]

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

Re: [PATCH] UUID support

From: Bean
Subject: Re: [PATCH] UUID support
Date: Fri, 30 May 2008 02:49:22 +0800

On Fri, May 30, 2008 at 2:17 AM, Robert Millan <address@hidden> 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

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.


reply via email to

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