All of lore.kernel.org
 help / color / mirror / Atom feed
* Conditional Statement in Grub 2
@ 2008-01-03  1:11 Antonio Dupont
  2008-01-03  3:00 ` Gregg Levine
  2008-01-03 11:40 ` Robert Millan
  0 siblings, 2 replies; 5+ messages in thread
From: Antonio Dupont @ 2008-01-03  1:11 UTC (permalink / raw)
  To: grub-devel



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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Conditional Statement in Grub 2
  2008-01-03  1:11 Conditional Statement in Grub 2 Antonio Dupont
@ 2008-01-03  3:00 ` Gregg Levine
  2008-01-03 16:32   ` Antonio Dupont (Moose Factory)
  2008-01-03 11:40 ` Robert Millan
  1 sibling, 1 reply; 5+ messages in thread
From: Gregg Levine @ 2008-01-03  3:00 UTC (permalink / raw)
  To: The development of GRUB 2

On Jan 2, 2008 8:11 PM, Antonio Dupont <antonio@moosefactory.com> wrote:
>
>
> 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
>
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
Hello!
This is for the GRUB2 development efforts. Ideally you'd want the one
for Grub-Legacy. Oh and if your release of GRUB-0.97 was patched by
the Centos builders in some way we'll be able to advise you of course,
but your advised to bring the matter to them.
-- 
Gregg C Levine gregg.drwho8@gmail.com
"This signature was once found posting rude
 messages in English in the Moscow subway."



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Conditional Statement in Grub 2
  2008-01-03  1:11 Conditional Statement in Grub 2 Antonio Dupont
  2008-01-03  3:00 ` Gregg Levine
@ 2008-01-03 11:40 ` Robert Millan
  1 sibling, 0 replies; 5+ messages in thread
From: Robert Millan @ 2008-01-03 11:40 UTC (permalink / raw)
  To: The development of GRUB 2

On Thu, Jan 03, 2008 at 01:11:56AM -0000, Antonio Dupont wrote:
> 
> 
> 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 

You can do this with GRUB, the syntax I don't recall exactly but it is
bash-like.

> 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.

GRUB 2 only.

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Conditional Statement in Grub 2
  2008-01-03  3:00 ` Gregg Levine
@ 2008-01-03 16:32   ` Antonio Dupont (Moose Factory)
  2008-01-03 19:09     ` Antonio Dupont
  0 siblings, 1 reply; 5+ messages in thread
From: Antonio Dupont (Moose Factory) @ 2008-01-03 16:32 UTC (permalink / raw)
  To: The development of GRUB 2

Thanks for the reply Gregg.  I think 0.97 is the path I will explore 
further.  One last question.  Do you know where the legacy archives are.  I 
couldn't find them.

Regards,  Antonio
----- Original Message ----- 
From: "Gregg Levine" <gregg.drwho8@gmail.com>
To: "The development of GRUB 2" <grub-devel@gnu.org>
Sent: Wednesday, January 02, 2008 7:00 PM
Subject: Re: Conditional Statement in Grub 2


> On Jan 2, 2008 8:11 PM, Antonio Dupont <antonio@moosefactory.com> wrote:
>>
>>
>> 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
>>
>>
>>
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> http://lists.gnu.org/mailman/listinfo/grub-devel
>>
> Hello!
> This is for the GRUB2 development efforts. Ideally you'd want the one
> for Grub-Legacy. Oh and if your release of GRUB-0.97 was patched by
> the Centos builders in some way we'll be able to advise you of course,
> but your advised to bring the matter to them.
> -- 
> Gregg C Levine gregg.drwho8@gmail.com
> "This signature was once found posting rude
> messages in English in the Moscow subway."
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel 




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Conditional Statement in Grub 2
  2008-01-03 16:32   ` Antonio Dupont (Moose Factory)
@ 2008-01-03 19:09     ` Antonio Dupont
  0 siblings, 0 replies; 5+ messages in thread
From: Antonio Dupont @ 2008-01-03 19:09 UTC (permalink / raw)
  To: The development of GRUB 2



I think I found the archives in bug-grub.  Sorry I didn't see it earlier.

Antonio



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-01-03 19:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-03  1:11 Conditional Statement in Grub 2 Antonio Dupont
2008-01-03  3:00 ` Gregg Levine
2008-01-03 16:32   ` Antonio Dupont (Moose Factory)
2008-01-03 19:09     ` Antonio Dupont
2008-01-03 11:40 ` Robert Millan

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.