From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JAEcu-0007DY-Iw for mharc-grub-devel@gnu.org; Wed, 02 Jan 2008 20:12:04 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JAEcs-0007DO-KH for grub-devel@gnu.org; Wed, 02 Jan 2008 20:12:02 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JAEcq-0007Cs-24 for grub-devel@gnu.org; Wed, 02 Jan 2008 20:12:01 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JAEcp-0007Cp-TC for grub-devel@gnu.org; Wed, 02 Jan 2008 20:11:59 -0500 Received: from moosefactory-relay.moosefactory.com ([216.250.119.182]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JAEcp-0003zG-FU for grub-devel@gnu.org; Wed, 02 Jan 2008 20:11:59 -0500 Received: from mail.moosefactory.com by relay Received: from mail.moosefactory.com (localhost.localdomain [127.0.0.1]) by mail.moosefactory.com (8.12.11/8.12.11) with ESMTP id m031BueI023594 for ; Wed, 2 Jan 2008 17:11:56 -0800 Received: (from apache@localhost) by mail.moosefactory.com (8.12.11/8.12.11/Submit) id m031Bui8023593; Wed, 2 Jan 2008 17:11:56 -0800 Message-Id: <200801030111.m031Bui8023593@mail.moosefactory.com> To: Date: Thu, 3 Jan 2008 01:11:56 -0000 From: "Antonio Dupont" X-Mailer: TWIG 2.7.6 X-detected-kernel: by monty-python.gnu.org: FreeBSD 6.x (1) Subject: Conditional Statement in Grub 2 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: Thu, 03 Jan 2008 01:12:02 -0000 Hello, I apologize if this is the wrong list, but this is the list I have found through my searches. Please tell me where to go if this is not the proper place. I would like to have grub do a conditional statement similar to this: if file_name on /dev/cdrom matches file_name on /dev/sda1 (USB device) then boot Linux else boot Windows I've search through the Grub site and see there is some support for scripting, but I don't know how developed it is and if it can do what I'm asking. At the boot loader stage can it even see the cdrom or USB? I also saw in the older Grub archives .... "For scripting support, there are a lot of uses. For example booting a specific OS depending on the time. Some people requested that. If you look in the pupa-devel archives, you can find the examples Okuji gave." But, I can't find the pupa-devel archives, they seem to be off-line. I'm using CentOS 5.0 and if I can do it with Grub 0.97 that comes with the distro that would be great. I can also upgrade if needed. Any comments or direction would be much appreciated. Thanks and regards, Antonio