Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Q76ZQ-0006Ku-Vc for mharc-grub-devel@gnu.org; Tue, 05 Apr 2011 09:45:25 -0400 Received: from [140.186.70.92] (port=43337 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q76ZK-0006He-Px for grub-devel@gnu.org; Tue, 05 Apr 2011 09:45:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q76ZJ-00041h-LS for grub-devel@gnu.org; Tue, 05 Apr 2011 09:45:18 -0400 Received: from smarthost02.mail.zen.net.uk ([212.23.3.141]:34502) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q76ZJ-00040e-Eo for grub-devel@gnu.org; Tue, 05 Apr 2011 09:45:17 -0400 Received: from [82.69.40.219] (helo=riva.pelham.vpn.ucam.org) by smarthost02.mail.zen.net.uk with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1Q76ZG-0003zI-HM for grub-devel@gnu.org; Tue, 05 Apr 2011 13:45:14 +0000 Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 4.72) (envelope-from ) id 1Q76ZE-0006eT-Er for grub-devel@gnu.org; Tue, 05 Apr 2011 14:45:12 +0100 Date: Tue, 5 Apr 2011 14:45:11 +0100 From: Colin Watson To: grub-devel@gnu.org Message-ID: <20110405134511.GE9163@riva.ucam.org> References: <4D9B117C.6020000@redepontocerto.com.br> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D9B117C.6020000@redepontocerto.com.br> User-Agent: Mutt/1.5.20 (2009-06-14) X-Originating-Smarthost02-IP: [82.69.40.219] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 212.23.3.141 Subject: Re: Detect the motherboard model or especifc device in GRUB X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Apr 2011 13:45:23 -0000 On Tue, Apr 05, 2011 at 09:56:28AM -0300, gilson.santos@redepontocerto.com.br wrote: > its possible execute a bash script on grub commando line? (option > "c" on grub), to be more especificle a have two motherboards and i > need to detect her before the kernel is loaded, > > the bash script for example verify with "lspci" and make a "choice" > in to menu.lst, and booting the kernel for especificle hardware No, bash is not available in GRUB. However, the GRUB command line has a syntax quite similar to bash, and you can use it to perform conditional operations. At present, though, I don't think there's a way to use PCI configuration information in a GRUB script condition. Perhaps there's something else you can base the decision on? -- Colin Watson [cjwatson@ubuntu.com]