All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: Search command.
Date: Wed, 11 Mar 2009 00:04:33 -0400	[thread overview]
Message-ID: <1236744273.27368.7.camel@mj> (raw)
In-Reply-To: <1236731686.9908.22.camel@localhost.localdomain>

On Wed, 2009-03-11 at 13:34 +1300, Centurion Computer Technology (2005)
Ltd wrote:
> Hi,
> 
> I am playing with the search command in grub2 from debian experimental
> and have noticed some oddness
> 
> The search command currently returns the device as hdX,X rather than
> (hdX,X).  This means that the variable created using -s can't be used as
> a replacement for the device string.

Actually, you can assign it to the root variable and use relative path.
You don't need parentheses in the root variable.

>   For Example I'd like to be able to
> do this:
> 
> # Set our root device
> search -f /grub/grub.cfg -s root
> # Set our prefix 
> set prefix=${root}/grub/  # I think broken variable handling means this
> doesn't work.

True.  Variable expansion is broken.  But you can use

set prefix=/grub/

That would allow you to load more modules as long as $root is unchanged.

> menuentry "My Linux OS" {
> search -s LINUX_ROOT -u XXXX-YYYY-ZZZZ-AAAA-BBBB
> set root=$LINUX_ROOT

This is broken for the same reason.  But this would work:

search -s root -u XXXX-YYYY-ZZZZ-AAAA-BBBB

> Or do I completely misunderstand the search command and usage of
> variables?

You understand it correctly.  But the implementation is limited.

-- 
Regards,
Pavel Roskin



  reply	other threads:[~2009-03-11  4:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-11  0:34 Search command Centurion Computer Technology (2005) Ltd
2009-03-11  4:04 ` Pavel Roskin [this message]
2009-03-11 23:52   ` Centurion Computer Technology (2005) Ltd
2009-03-12  0:12     ` Centurion Computer Technology (2005) Ltd
2009-03-12  0:51       ` phcoder
2009-03-12  2:59         ` Centurion Computer Technology (2005) Ltd
2009-03-12  3:16     ` Pavel Roskin
2009-03-12 10:22       ` Centurion Computer Technology (2005) Ltd
  -- strict thread matches above, loose matches on Subject: below --
2005-08-20  7:56 search command Yoshinori K. Okuji

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=1236744273.27368.7.camel@mj \
    --to=proski@gnu.org \
    --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.