[syslinux] SYSLINUX 2.09, 2.10-pre1 released
ganapathy murali krishnan
gmurali at cs.uchicago.edu
Wed May 5 10:41:00 PDT 2004
Gebhardt Thomas wrote:
--- snip ---
> but still have two problems
> 1. I can escape the menu system and get the syslinux boot prompt with either
> "ESC" or "arrow left" in the main menu. Did I do something wrong?
> 2. Can I easily configure the menu system to do something (boot from the
> local disk) after a specified timeout, i.e., can I configure a noninteractive
> default boot?
You did not do anything wrong. The default setup of the menu is to quit
the menu when the user hits "Esc" or "arrow left". However with a
little bit of C programming, you can solve both your problems...
* Default setup (Overview of how mymenu.c works)
initialise menu...
runmenu...
if user chose something
do it
endif
* What your new mymenu.c should do
print "Press any key within 5 seconds.. to active menu..."
clear keyboard buffer
wait for 5 seconds
if keyboard buffer is not empty
run "localboot" / "chain.c32 hd0 0"
else
initialise menu...
loop:
runmenu....
if valid choice
execute it
endif
goto loop
endif
Clearing and checking the kbd buffer can be done through BIOS interrupts.
To sleep for 5 seconds: here is one solution: Note the current time, and
run an while loop, and exit that loop only when 5 seconds have passed.
This is considered really bad programming for any multi-tasking OS. But
hey, our code is the only one which is running now, so we can afford to
do it.
- Murali
>On Thursday 29 April 2004 17:20, you wrote:
>
>Hi,
>
>
>
>>Till such a feature comes along, you can implement the same
>>functionality as follows:
>>
>>* Create a menu, with options corresponding to the different isolinux
>>labels
>>* Set pcelinux.cfg to run the menu directly without any wait.
>>
>>This way you get a slightly user friendly interface and the users dont
>>have access to the pxelinux boot prompt.
>>
>>
>
>I tried to do that
>
>(pxelinux.cfg:
>
>DEFAULT mymenu.com
>PROMPT 0
>ONTIMEOUT ...
>ONERROR ...
>...
>)
>
>
>but still have two problems
>
>1. I can escape the menu system and get the syslinux boot prompt with either
>"ESC" or "arrow left" in the main menu. Did I do something wrong?
>
>2. Can I easily configure the menu system to do something (boot from the
>local disk) after a specified timeout, i.e., can I configure a noninteractive
>default boot?
>
>My intention is as follows:
>I have a bunch of windows hosts, and want to supply the possibility to
>boot a diskless Linux by PXE.
>constraints:
>1. If the user who boots the machine does nothing at all, it should boot
>windows, just as before.
>2. A linux user should not be able to get root privileges by supplying
>additional kernel boot arguments.
>
>Thanks, Thomas
>
>
>
More information about the Syslinux
mailing list