[syslinux] NOESCAPE config option

Sebastian Herbszt herbszt at gmx.de
Wed Jun 3 13:42:43 PDT 2009


Михаил wrote:
>> So with "DEFAULT menu.c32" and "NOESCAPE 1" the simple menu system is left
>> and restarted again. I think both features work as designed.
>
> OK. Can you help me with other issue?
>
> As designed by next config file, if user enter garbage on boot prompt
> cpuid info displayed on screen.
> ****config****
> UI menu.c32
> ONERROR cpuidtest.c32
> LABEL commandline
> MENU LABEL ^0) commandline
> MENU QUIT
> LABEL restart
> MENU LABEL ^9) restart
> MENU DEFAULT
> COM32 reboot.c32
> ****
> But why config file with "ONERROR vesamenu.c32" or "ONERROR menu.c32"
> option make syslinux crash on user garbage input at command line?

It doesn't crash. syslinux.txt has the following for ONERROR:

ONERROR kernel options...
        If a kernel image is not found (either due to it not existing,
        or because IMPLICIT is set), run the specified command.  The
        faulty command line is appended to the specified options, so
        if the ONERROR directive reads as:

                ONERROR xyzzy plugh

        ... and the command line as entered by the user is:

                foo bar baz

        ... Syslinux will execute the following as if entered by the
        user:

                xyzzy plugh foo bar baz

So if you specify "foo" on the command line, your ONERROR program
is being run with the parameter "foo". cpuidtest.c32 ignore the parameter and
hello.c32 displays it on the screen.
Now (vesa)menu.c32 tries to parse it as an alternative config file (see menu.txt).
Since it can't parse it (likely file not found), the program behaves odd [1].
You can fix this by specifiying the config file or "~" for current file on your ONERROR line like:
ONERROR menu.c32 ~

[1] http://syslinux.zytor.com/archives/2009-May/012507.html

- Sebastian




More information about the Syslinux mailing list