From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LhFgN-0004YY-MZ for mharc-grub-devel@gnu.org; Wed, 11 Mar 2009 00:04:39 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LhFgM-0004X2-9r for grub-devel@gnu.org; Wed, 11 Mar 2009 00:04:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LhFgL-0004WF-9M for grub-devel@gnu.org; Wed, 11 Mar 2009 00:04:37 -0400 Received: from [199.232.76.173] (port=56959 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LhFgL-0004W4-6I for grub-devel@gnu.org; Wed, 11 Mar 2009 00:04:37 -0400 Received: from c60.cesmail.net ([216.154.195.49]:60228) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1LhFgK-00085z-Oe for grub-devel@gnu.org; Wed, 11 Mar 2009 00:04:36 -0400 Received: from unknown (HELO smtprelay2.cesmail.net) ([192.168.1.112]) by c60.cesmail.net with ESMTP; 11 Mar 2009 00:04:34 -0400 Received: from [192.168.0.22] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by smtprelay2.cesmail.net (Postfix) with ESMTPSA id 462ED34C6D for ; Wed, 11 Mar 2009 00:04:16 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: <1236731686.9908.22.camel@localhost.localdomain> References: <1236731686.9908.22.camel@localhost.localdomain> Content-Type: text/plain Date: Wed, 11 Mar 2009 00:04:33 -0400 Message-Id: <1236744273.27368.7.camel@mj> Mime-Version: 1.0 X-Mailer: Evolution 2.24.5 (2.24.5-1.fc10) Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: Search command. X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Mar 2009 04:04:38 -0000 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