[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Conditional Statement in Grub 2

From: Antonio Dupont
Subject: Conditional Statement in Grub 2
Date: Thu, 3 Jan 2008 01:11:56 -0000


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 

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

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,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]