[syslinux] Minor idea - "Press any key to boot within 5 second" style of thing...

Murali Krishnan Ganapathy gmurali at cs.uchicago.edu
Thu Sep 22 18:00:19 PDT 2005


It should be very easy to do this using COMBOOT. write a code called 
"ifthen.com" which takes three arguments

(1) How long to wait (call it NSEC)
(2) Image1 (THEN)
(3) Image2 (ELSE)

The code prints "Press any key in NSEC seconds to continue", and waits 
for NSEC seconds.
If within this duration a key was pressed then you execute THEN image 
otherwise you execute ELSE image.

Once this is done, make "ifthen.com" as the default image like this

default ifthen

label ifthen
  kernel ifthen.com
  append 10 "default" "localboot -1"

Thats all there is to it! At boot time if user presses a key in NSEC 
seconds then "default" is executed else "localboot -1" is executed. If 
you are particular about booting from the hard disk, replace "localboot 
-1" with "chain.c32 hda 0" (or something similar).

You can use some of the code in the advanced menu, as a starting point, 
for the wait for NSEC seconds part.

- Murali

Nazo wrote:
> I like how some cds, such as the windows installer discs will skip
> booting from the disc if you accidentally left the drive because they
> require you to hit a key to make them actually boot from the disc. 
> I've kind of tried to emulate this behavior using chain.c32, but, it
> requires me to specify which harddrive, and I'd rather see an
> independant setup.  I've tried localboot -1, but, it seems it's not
> supported by all BIOSes (including that of my previous system --
> haven't tested my current one.)
>
> Of course, if such a thing were possible, it'd need to be an optional
> thing and with configurable time (I don't like the default short
> periods because sometimes it takes that long for the display and
> monitor to completely initialize and it's already moved on by the time
> you could have seen the message.)
>
> Anyway, just a thought.  And if there's already some way to do this
> that's independant of crappy bioses or harddrives in different
> locations, it'd be great to know.
>
> _______________________________________________
> SYSLINUX mailing list
> Submissions to SYSLINUX at zytor.com
> Unsubscribe or set options at:
> http://www.zytor.com/mailman/listinfo/syslinux
> Please do not send private replies to mailing list traffic.
>
>
>   




More information about the Syslinux mailing list