All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Centurion Computer Technology (2005) Ltd" <daniel@centurion.net.nz>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: Search command.
Date: Thu, 12 Mar 2009 12:52:40 +1300	[thread overview]
Message-ID: <1236815560.8320.78.camel@localhost.localdomain> (raw)
In-Reply-To: <1236744273.27368.7.camel@mj>

On Wed, 2009-03-11 at 00:04 -0400, Pavel Roskin wrote:
> 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/
but this means as soon as root is set to the new device, that we can't
load anymore modules which breaks chainloader, linux, intrd, boot etc

and it appears preloading boot doesn't work anyway, as it tries to find
it.  This problem doesn't occur if I manually set prefix=(hdX,X)/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
Nope, as above, because we cannot set Prefix to include the device
programmatically, as soon as you've changed your root, you can no longer
load modules or use commands.

-- 
Daniel Reurich

Centurion Computer Technology (2005) Limited.
Ph: 021 797 722




  reply	other threads:[~2009-03-11 23:52 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
2009-03-11 23:52   ` Centurion Computer Technology (2005) Ltd [this message]
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=1236815560.8320.78.camel@localhost.localdomain \
    --to=daniel@centurion.net.nz \
    --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.