Difference between revisions of "Menu"

From Syslinux Wiki
Jump to: navigation, search
m (Add links.)
m (Wiki formatting.)
 
(12 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
[[Category:Modules]]
 
[[Category:Modules]]
 
[[Category:Directives]]
 
[[Category:Directives]]
<!--
+
<!--  
(See also [[Syslinux 4 Changelog|Syslinux 4 Changelog]] and [[SYSLINUX#How do I Configure SYSLINUX.3F|How do I Configure SYSLINUX]] )
+
--><!-- (See also [[Syslinux 4 Changelog|Syslinux 4 Changelog]] and  
 
+
--><!-- [[SYSLINUX#How do I Configure SYSLINUX.3F|How do I Configure SYSLINUX]] )
<font size=1>( Note that since version 3.74, the <tt>DEFAULT</tt> directive usage has changed. Use <tt>UI</tt> instead)
+
--><!--
( See [[News-3.74#UI mode|UI mode]] or [[Syslinux 3 Changelog#Changes in 3.74|Changes in 3.74]] )</font size>
+
--><!-- <font size="1">( Note that since version 3.74,  
  -->
+
--><!-- the <tt>DEFAULT</tt> directive usage has changed. Use <tt>UI</tt> instead)
 
+
--><!-- ( See [[News-3.74#UI mode|UI mode]] or  
 
+
--><!-- [[Syslinux 3 Changelog#Changes in 3.74|Changes in 3.74]] )</font>
 +
--><!--
 +
-->
 
== Introduction ==
 
== Introduction ==
There are two menu systems included with Syslinux, the advanced menu
+
There are two menu systems included with Syslinux, the advanced menu system,  
system, and the simple menu system.
+
and the simple menu system.
 
+
  
 +
<br />
 
=== The advanced menu system ===
 
=== The advanced menu system ===
  
The advanced menu system, written by Murali Krishnan Ganapathy, is located in the <tt>com32/cmenu/</tt> {{nowrap|sub-directory.}}
+
The advanced menu system, written by Murali Krishnan Ganapathy,  
It allows the user to create hierarchical {{nowrap|sub-menus,}} dynamic options, check-boxes, and just about anything.
+
is located in the <tt>com32/cmenu/</tt> {{nowrap|sub-directory.}}  
 +
It allows the user to create hierarchical {{nowrap|sub-menus,}}  
 +
dynamic options, check-boxes, and just about anything.  
 
It requires the menu to be compiled from a simple C file (see  
 
It requires the menu to be compiled from a simple C file (see  
 
[http://git.kernel.org/cgit/boot/syslinux/syslinux.git/tree/com32/cmenu/simple.c com32/cmenu/simple.c]  
 
[http://git.kernel.org/cgit/boot/syslinux/syslinux.git/tree/com32/cmenu/simple.c com32/cmenu/simple.c]  
Line 27: Line 31:
 
[http://git.kernel.org/cgit/boot/syslinux/syslinux.git/tree/com32/cmenu/complex.c com32/cmenu/complex.c]  
 
[http://git.kernel.org/cgit/boot/syslinux/syslinux.git/tree/com32/cmenu/complex.c com32/cmenu/complex.c]  
 
for examples).
 
for examples).
 
+
<!-- --><!--
 +
--><!-- Alternative links:
 +
--><!-- https://repo.or.cz/syslinux.git/blob/HEAD:/com32/cmenu/simple.c
 +
--><!-- https://repo.or.cz/syslinux.git/blob/HEAD:/com32/cmenu/complex.c
 +
--><!-- -->
  
 
The advanced menu system does not support serial console at this time.
 
The advanced menu system does not support serial console at this time.
  
 
See [http://git.kernel.org/cgit/boot/syslinux/syslinux.git/tree/com32/cmenu/README com32/cmenu/README]  
 
See [http://git.kernel.org/cgit/boot/syslinux/syslinux.git/tree/com32/cmenu/README com32/cmenu/README]  
 +
<!-- http://repo.or.cz/syslinux.git/blob/HEAD:/com32/cmenu/README -->
 
for more information.
 
for more information.
  
 
+
<br />
 
=== The simple menu system ===
 
=== The simple menu system ===
  
 
The simple menu system is based on a module located at  
 
The simple menu system is based on a module located at  
 
<tt>com32/menu/vesamenu.c32</tt> (graphical) or  
 
<tt>com32/menu/vesamenu.c32</tt> (graphical) or  
<tt>com32/menu/menu.c32</tt> (text mode only).
+
<tt>com32/menu/menu.c32</tt> (text mode only).  
It uses the same configuration file as the regular Syslinux command line, and displays all the <tt>LABEL</tt> statements.
+
It uses the same configuration file as the regular Syslinux command line,  
 +
and displays all the <tt>LABEL</tt> statements.
  
To use the menu system, simply make sure <tt>[vesa]menu.c32</tt> is in the appropriate location for the boot medium (the same directory as the configuration file for SYSLINUX, EXTLINUX and ISOLINUX, and the same directory as pxelinux.0 for PXELINUX), and put the following options in the configuration {{nowrap|file :}}
+
To use the menu system,  
 +
simply make sure <tt>[vesa]menu.c32</tt> is in the appropriate location for the boot medium  
 +
(the same directory as the configuration file for SYSLINUX, EXTLINUX and ISOLINUX,  
 +
and the same directory as pxelinux.0 for PXELINUX),  
 +
and put the following options in the configuration file&nbsp;:
  
 
<pre>
 
<pre>
DEFAULT menu.c32
+
DEFAULT menu.c32
PROMPT 0
+
PROMPT 0
 
</pre>
 
</pre>
  
Line 52: Line 66:
  
 
<pre>
 
<pre>
UI menu.c32
+
UI menu.c32
 
</pre>
 
</pre>
  
There are a few menu additions to the configuration file, all starting with the keywords <tt>MENU</tt> or <tt>TEXT</tt>.  
+
There are a few menu additions to the configuration file,  
 +
all starting with the keywords <tt>MENU</tt> or <tt>TEXT</tt>.  
 
As the rest of the Syslinux configuration file language, it is case-insensitive.
 
As the rest of the Syslinux configuration file language, it is case-insensitive.
  
The remaining of this document is a reference of the directives that are relevant in the Simple Menu System.
+
The remaining of this document is a reference of the directives  
 +
that are relevant in the Simple Menu System.
  
 +
<br />
 +
== MENU LABEL ==
 +
{{S|MENU_LABEL}}
 +
<code>'''MENU LABEL''' ''label''</code>
  
== MENU TITLE ==
+
''(Only valid after a LABEL statement)''<br />
<code>'''MENU TITLE''' ''title''</code>
+
Change the label displayed for a specific menu entry.
 +
Display a label that is not suitable for the command line.
 +
For example:
  
Give the menu a title.  The title is presented at the top of the menu.
 
 
 
== MENU HIDDEN ==
 
<code>'''MENU HIDDEN'''</code>
 
 
Do not display the actual menu unless the user presses a [[Directives/special_keys#MENU_HIDDEN|key]]. All that is displayed is a timeout message.
 
 
 
== MENU HIDDENKEY ==
 
<code>'''MENU HIDDENKEY''' ''key[,key...] command...''</code>
 
 
If "''key''" is used to interrupt MENU HIDDEN, then execute the specified command instead of displaying the menu.
 
 
In addition to all single characters, plus the syntax {{nowrap|" ''^X'' "}} for {{nowrap|" [Ctrl-X] "}}, currently the following key names are recognized:
 
 
:<tt>Backspace, Tab, Enter, Esc, Space, F1..F12, Up, Down, Left, Right, PgUp, PgDn, Home, End, Insert, Delete</tt>
 
 
Note that single characters are treated as case-sensitive, so [A] and [a] can bind different commands. 
 
The same command can be bound to different keys by giving a comma-separated list of [[Directives/special_keys#MENU_HIDDENKEY|keys]]:
 
 
<pre>
 
<pre>
menu hiddenkey A,a key_a_command
+
# Soft Cap Linux
 +
LABEL softcap
 +
  MENU LABEL Soft Cap ^Linux 9.6.36
 +
  KERNEL softcap-9.6.36.bzi
 +
  APPEND whatever
 +
 +
# A very dense operating system
 +
LABEL brick
 +
  MENU LABEL ^Windows CE/ME/NT
 +
  KERNEL chain.c32
 +
  APPEND hd0 2
 
</pre>
 
</pre>
  
 +
The caret symbol (^) in a <tt>MENU LABEL</tt> statement defines a hotkey.
 +
Hotkeys are highlighted in the menu.
 +
When a hotkey is pressed, the cursor will move to the corresponding menu entry.
 +
If [[#MENU IMMEDIATE|<tt>MENU IMMEDIATE</tt>]] is present,
 +
then when a hotkey is pressed the corresponding menu entry will be directly launched.
  
== MENU CLEAR ==
+
Reusing hotkeys has no effect on subsequent entries;
<code>'''MENU CLEAR'''</code>
+
they will not be highlighted, and the cursor will not move
 +
<!-- to them when the hotkey is pressed -->  
 +
again.
  
Clear the screen when exiting the menu, instead of leaving the menu displayed. 
+
Keep in mind that the [[Config#LABEL|<tt>LABEL</tt>s]],  
For vesamenu, this means the graphical background is still displayed without the menu itself for as long as the screen remains in graphics mode.
+
not {{nowrap|<tt>MENU LABEL</tt>s}},  
 +
must be unique, or odd things will happen to the command-line.
  
 +
<br />
  
== MENU SHIFTKEY ==
+
== MENU INDENT ==
<code>'''MENU SHIFTKEY'''</code>
+
{{S|MENU_INDENT}}
 
+
<code>'''MENU INDENT''' ''count''</code>
Exit the menu system immediately unless either the [Shift] or the [Alt] [[Directives/special_keys#MENU_SHIFTKEY|key]] is pressed, or {{nowrap|[Caps Lock]}} or {{nowrap|[Scroll Lock]}} is set.
+
  
 +
''(Only valid after a LABEL statement)''<br />
 +
Add "''count''" spaces in front of the displayed menu entry.
  
 +
<br />
 
== MENU SEPARATOR ==
 
== MENU SEPARATOR ==
 +
{{S|MENU_SEPARATOR}}
 
<code>'''MENU SEPARATOR'''</code>
 
<code>'''MENU SEPARATOR'''</code>
  
 
Insert an empty line in the menu.
 
Insert an empty line in the menu.
  
 +
<br />
 +
== MENU DISABLE ==
 +
{{S|MENU_DISABLE}}
 +
<code>'''MENU DISABLE'''</code>
  
== MENU LABEL ==
+
''(Only valid after a LABEL statement)''<br />
<code>'''MENU LABEL''' ''label''</code>
+
Make the entry unselectable.  
 
+
This allows to display a section in the menu with different options below it.  
''(Only valid after a LABEL statement.)''<br />
+
Change the label displayed for a specific menu entry.
+
Display a label that is not suitable for the command line.  
+
 
For example:
 
For example:
 
 
<pre>
 
<pre>
# Soft Cap Linux
+
# Entries for network boots
LABEL softcap
+
LABEL -
MENU LABEL Soft Cap ^Linux 9.6.36
+
  MENU LABEL Network:
KERNEL softcap-9.6.36.bzi
+
  MENU DISABLE
APPEND whatever
+
 
+
# Soft Cap Linux
# A very dense operating system
+
LABEL softcap
LABEL brick
+
  MENU LABEL Soft Cap ^Linux 9.6.36
MENU LABEL ^Windows CE/ME/NT
+
  MENU INDENT 1
KERNEL chain.c32
+
  KERNEL softcap-9.6.36.bzi
APPEND hd0 2
+
  APPEND whatever
 +
 +
# Dos 6.22
 +
LABEL dos
 +
  MENU LABEL ^Dos 6.22
 +
  MENU INDENT 1
 +
  KERNEL memdisk
 +
  APPEND initrd=dos622.imz
 +
 +
# Separator
 +
MENU SEPARATOR
 +
 +
# Entries for local boots
 +
LABEL -
 +
  MENU LABEL Local:
 +
  MENU DISABLE
 +
 +
# Windows 2000
 +
LABEL w2k
 +
  MENU LABEL ^Windows 2000
 +
  MENU INDENT 1
 +
  KERNEL chain.c32
 +
  APPEND hd0 1
 +
 +
# Windows XP
 +
LABEL xp
 +
  MENU LABEL Windows ^XP
 +
  MENU INDENT 1
 +
  KERNEL chain.c32
 +
  APPEND hd0 2
 
</pre>
 
</pre>
  
The caret symbol (^) in a <tt>MENU LABEL</tt> statement defines a hotkey.
+
<br />
Hotkeys are highlighted in the menu.
+
== MENU HIDE ==
When a hotkey is pressed, the cursor will move to the corresponding menu entry.
+
{{S|MENU_HIDE}}
If [[#MENU IMMEDIATE|<tt>MENU IMMEDIATE</tt>]] is present, then when a hotkey is pressed the corresponding menu entry will be directly launched.
+
<code>'''MENU HIDE'''</code>
  
Reusing hotkeys has no effect on subsequent entries; they will not be highlighted, and the cursor will not move again.
+
''(Only valid after a LABEL statement)''<br />
 +
Suppress a particular LABEL entry from the menu.
  
Keep in mind that the [[#MENU LABEL|<tt>LABEL</tt>s]], not {{nowrap|<tt>MENU LABEL</tt>s}}, must be unique, or odd things will happen to the command-line.
+
<br />
 +
== TEXT HELP ==
 +
<!-- --><!--
 +
--><!-- The following few lines shall start with at least
 +
--><!-- one space character per line for wiki formatting.
 +
--><!-- Do NOT use "pre" tags in the following few lines,  
 +
--><!-- as "pre" does not parse wiki markup.
 +
--><!-- -->
 +
{|
 +
| style=" vertical-align: top; font-family: monospace; " | {{S|TEXT_HELP}}
 +
|
 +
'''TEXT HELP'''<br />
 +
''Help text ...''
 +
''... which can span multiple lines''<br />
 +
'''ENDTEXT'''
 +
|}
  
 +
''(Only valid after a LABEL statement)''<br />
 +
Specify a help text that should be displayed when a particular menu entry is highlighted.
  
== MENU IMMEDIATE ==
+
<br />
<code>'''MENU IMMEDIATE'''</code>
+
== MENU BEGIN ==
 +
<!-- --><!--
 +
--><!-- The following few lines shall start with at least
 +
--><!-- one space character per line for wiki formatting.
 +
--><!-- Do NOT use "pre" tags in the following few lines,
 +
--><!-- as "pre" does not parse wiki markup.
 +
--><!-- -->
 +
{|
 +
| style=" vertical-align: top; font-family: monospace; " | {{S|MENU_BEGIN}}
 +
|
 +
'''MENU BEGIN''' [''tagname'']<br />
 +
'''MENU END'''
 +
|}
  
Allow hotkeys to activate immediately without needing [Enter].  
+
Begin/end a submenu.
 +
The entries between <tt>MENU BEGIN</tt> and <tt>MENU END</tt> form a submenu,
 +
which is marked with a ">" mark on the right hand of the screen.
 +
Submenus inherit the properties of their parent menus, but can override them,
 +
and can thus have their own backgrounds, master passwords,
 +
titles, timeouts, messages and so forth.
  
 +
<br />
 +
== MENU GOTO ==
 +
{{S|MENU_GOTO}}
 +
<code>'''MENU GOTO''' ''tagname''</code>
  
== MENU INDENT ==
+
''(Only valid after a LABEL statement)''<br />
<code>'''MENU INDENT''' ''count''</code>
+
Transfer to the named submenu instead of booting anything.
 +
To transfer to the top-level menu, specify {{nowrap|"<tt>menu goto .top</tt>".}}
  
''(Only valid after a LABEL statement.)''<br />
+
<br />
Add "''count''" spaces in front of the displayed menu entry.
+
== MENU EXIT ==
 +
{{S|MENU_EXIT}}
 +
<code>'''MENU EXIT''' [''tagname'']</code>
  
 +
''(Only valid after a LABEL statement inside <tt>MENU BEGIN ... MENU END</tt>)''<br />
 +
Exit to the next higher menu, or, if ''tagname'' is specified, to the named menu.
  
== MENU DISABLE ==
+
<br />
<code>'''MENU DISABLE'''</code>
+
== MENU QUIT ==
 +
{{S|MENU_QUIT}}
 +
<code>'''MENU QUIT'''</code>
  
''(Only valid after a LABEL statement.)''<br />
+
''(Only valid after a LABEL statement)''<br />
Make the entry unselectable. 
+
Quit the menu system.
This allows to display a section in the menu with different options below it.  
+
For example:
+
<pre>
+
# Entries for network boots
+
LABEL -
+
MENU LABEL Network:
+
MENU DISABLE
+
  
# Soft Cap Linux
+
'''WARNING''': Even if either {{nowrap|<tt>MENU MASTER PASSWD</tt>}}
LABEL softcap
+
or {{nowrap|"<tt>ALLOWOPTIONS 0</tt>"}} is set,
MENU LABEL Soft Cap ^Linux 9.6.36
+
{{nowrap|<tt>MENU QUIT</tt>}} will still allow exiting to the CLI;
MENU INDENT 1
+
however, a separate {{nowrap|<tt>MENU PASSWD</tt>}} can of course be set for this
KERNEL softcap-9.6.36.bzi
+
<!-- label / -->
APPEND whatever
+
menu entry.
  
# Dos 6.22
+
<br />
LABEL dos
+
== MENU START ==
MENU LABEL ^Dos 6.22
+
{{S|MENU_START}}
MENU INDENT 1
+
<code>'''MENU START'''</code>
KERNEL memdisk
+
APPEND initrd=dos622.imz
+
  
# Separator
+
''(Only valid inside <tt>MENU BEGIN ... MENU END</tt>)''<br />
MENU SEPARATOR
+
Define the starting menu for the menu system, instead of starting at the top-level menu.
 +
See also the [[#DEFAULT]] directive.
  
# Entries for local boots
+
<br />
LABEL -
+
== MENU DEFAULT ==
MENU LABEL Local:
+
{{S|MENU_DEFAULT}}
MENU DISABLE
+
<code>'''MENU DEFAULT'''</code>
  
# Windows 2000
+
''(Only valid after a LABEL statement)''<br />
LABEL w2k
+
The particular menu entry is considered the default for the particular {{nowrap|(sub)menu.}}
MENU LABEL ^Windows 2000
+
If no default is specified, use the first one.
MENU INDENT 1
+
See also the [[#DEFAULT]] directive.
KERNEL chain.c32
+
APPEND hd0 1
+
  
# Windows XP
+
<br />
LABEL xp
+
== DEFAULT ==
MENU LABEL Windows ^XP
+
{{S|DEFAULT}}
MENU INDENT 1
+
<code>'''DEFAULT''' ''label''</code>
KERNEL chain.c32
+
APPEND hd0 2
+
</pre>
+
  
 +
Set the global default.
 +
If "''label''" points into a submenu, that menu becomes the {{nowrap|''start menu''}}.
 +
In other words, this directive has the same effect as both
 +
[[#MENU DEFAULT|{{nowrap|<tt>MENU DEFAULT</tt>}}]] and
 +
[[#MENU START|{{nowrap|<tt>MENU START</tt>}}]].
  
== MENU HIDE ==
+
For backwards compatibility with earlier versions of Syslinux,
<code>'''MENU HIDE'''</code>
+
this behavior is ignored unless the configuration file also contains
 +
a [[Config#UI|UI]] directive.
  
''(Only valid after a LABEL statement.)''<br />
+
Note: the [[Config#DEFAULT|CLI]] accepts options after the ''label'', or even a non-label.
Suppress a particular LABEL entry from the menu.
+
The menu system does not support that.
  
 +
<br />
  
== MENU DEFAULT ==
+
== TIMEOUT ==
<code>'''MENU DEFAULT'''</code>
+
The menu system honours the <tt>TIMEOUT</tt> command.
 +
If <tt>TIMEOUT</tt> is specified,
 +
it will execute the <tt>ONTIMEOUT</tt> command if one exists,
 +
otherwise it will pick the <tt>DEFAULT</tt> menu option.
 +
'''WARNING''':
 +
the <tt>TIMEOUT</tt> action will bypass password protection
 +
even if one is set for the specified <tt>ONTIMEOUT</tt>
 +
<!-- and/or -->
 +
or <tt>DEFAULT</tt> entry!
  
''(Only valid after a LABEL statement.)''<br />
+
<br />
The particular menu entry is considered the default for the particular {{nowrap|(sub)menu.}}
+
== ALLOWOPTIONS ==
If no default is specified, use the first one.
+
Normally, users can press [Tab] to edit the menu entry,
See also the [[#DEFAULT]] directive.
+
and [Esc] to return to the Syslinux command line.
 +
However, if the configuration file specifies {{nowrap|"<tt>ALLOWOPTIONS 0</tt>"}},
 +
these keys will be disabled,
 +
and if {{nowrap|<tt>MENU MASTER PASSWD</tt>}} is set,  
 +
they require the master password.
  
 +
<br />
 +
== INCLUDE ==
 +
<!-- Leaving a hidden manual "anchor". -->
 +
<span id="MENU_INCLUDE"></span>
 +
{{S|INCLUDE}}
 +
<code>'''INCLUDE''' ''filename'' [''tagname'']</code><br />
 +
{{S|MENU_INCLUDE}}
 +
<code>'''MENU INCLUDE''' ''filename'' [''tagname'']</code>
  
== TEXT HELP ==
+
Include the contents of the ''filename'' configuration file at this point.
<!-- The following few lines shall start with at least -->
+
<!-- one space character per line for wiki formatting. -->
+
<!-- Do NOT use "pre" tags in the following few lines, -->
+
<!-- as "pre" does not parse wiki markup. -->
+
'''TEXT HELP'''<br />
+
''Help text ...''<br />
+
''... which can span multiple lines''<br />
+
'''ENDTEXT'''
+
  
''(Only valid after a LABEL statement.)''<br />
+
In the case of <tt>MENU INCLUDE</tt>, the included data is only seen by the menu system;
Specify a help text that should be displayed when a particular menu entry is highlighted.
+
the core Syslinux code does not parse this command,
 +
so any labels defined in it are unavailable.
  
 +
If a ''tagname'' is included,
 +
the whole file is considered to have been bracketed with a
 +
{{nowrap|"<code>MENU BEGIN ''tagname'' ... MENU END</code>"}} pair,
 +
and will therefore show up as a submenu.
  
 +
<br />
 
== MENU PASSWD ==
 
== MENU PASSWD ==
 +
{{S|MENU_PASSWD}}
 
<code>'''MENU PASSWD''' ''passwd''</code>
 
<code>'''MENU PASSWD''' ''passwd''</code>
  
''(Only valid after a LABEL statement or a MENU BEGIN statement.)''<br />
+
''(Only valid after a LABEL statement or a MENU BEGIN statement)''<br />
Set a password on this menu entry.
+
Set a password on this menu entry.  
"''passwd''" can be either a cleartext password or a password encrypted with one of the following algorithms:
+
"''passwd''" can be either a cleartext password or  
 +
a password encrypted with one of the following algorithms:
  
 +
{|
 +
|
 
<pre>
 
<pre>
MD5      (Signature: $1$)
+
MD5      (Signature: $1$)
SHA-1    (Signature: $4$)
+
SHA-1    (Signature: $4$)
SHA-2-256 (Signature: $5$)
+
SHA-2-256 (Signature: $5$)
SHA-2-512 (Signature: $6$)
+
SHA-2-512 (Signature: $6$)
 
</pre>
 
</pre>
 +
|}
  
Use the included Perl scripts "<tt>sha1pass</tt>" or "<tt>md5pass</tt>" to encrypt passwords.
+
Use the included Perl scripts "<tt>sha1pass</tt>" or "<tt>md5pass</tt>" to encrypt passwords.  
 
MD5 passwords are compatible with most Unix password file utilities;  
 
MD5 passwords are compatible with most Unix password file utilities;  
 
{{nowrap|SHA-1}} passwords are probably unique to Syslinux;  
 
{{nowrap|SHA-1}} passwords are probably unique to Syslinux;  
{{nowrap|SHA-2}} passwords are compatible with very recent Linux distributions.
+
{{nowrap|SHA-2}} passwords are compatible with very recent Linux distributions.  
 
Obviously, if you don't encrypt your passwords they will not be very secure at all.
 
Obviously, if you don't encrypt your passwords they will not be very secure at all.
  
If using passwords, make sure to use {{nowrap|"<tt>NOESCAPE 1</tt>"}} and {{nowrap|"<tt>PROMPT 0</tt>",}} and either set {{nowrap|"<tt>ALLOWOPTIONS 0</tt>"}} or use a [[#MENU MASTER PASSWD|master password]].
+
If using passwords, make sure to use  
 
+
{{nowrap|"<tt>NOESCAPE 1</tt>"}} and  
If ''passwd'' is an empty string, this menu entry can only be unlocked with the master password.
+
{{nowrap|"<tt>PROMPT 0</tt>",}} and either set  
 +
{{nowrap|"<tt>ALLOWOPTIONS 0</tt>"}}  
 +
or use a [[#MENU MASTER PASSWD|master password]].
  
 +
If ''passwd'' is an empty string,
 +
this menu entry can only be unlocked with the master password.
  
 +
<br />
 
== MENU MASTER PASSWD ==
 
== MENU MASTER PASSWD ==
 +
{{S|MENU_MASTER_PASSWD}}
 
<code>'''MENU MASTER PASSWD''' ''passwd''</code>
 
<code>'''MENU MASTER PASSWD''' ''passwd''</code>
  
Set a master password.
+
Set a master password.  
 
This password can be used to boot any menu entry.  
 
This password can be used to boot any menu entry.  
If this directive is used, then the master password is also required for the [Tab] and [Esc] keys to work.
+
If this directive is used,  
 +
then the master password is also required for the [Tab] and [Esc] keys to work.
  
 +
<br />
 +
== MENU TITLE ==
 +
{{S|MENU_TITLE}}
 +
<code>'''MENU TITLE''' ''title''</code>
  
== MENU RESOLUTION ==
+
Give the menu a title. The title is presented at the top of the menu.
<code>'''MENU RESOLUTION''' ''height width''</code>
+
  
Request a specific screen resolution when in graphics mode. 
+
<br />
The default is "640 480" corresponding to a resolution of 640x480 pixels, which all VGA-compatible monitors should be able to display.
+
== MENU HIDDEN ==
 +
{{S|MENU_HIDDEN}}
 +
<code>'''MENU HIDDEN'''</code>
  
If the specified resolution is unavailable, the text mode menu is displayed instead.
+
Do not display the actual menu unless the user presses a
 +
[[Directives/special keys#MENU HIDDEN|key]].
 +
All that is displayed is a timeout message.
  
 +
<br />
 +
== MENU HIDDENKEY ==
 +
<div style=" white-space: pre; ">{{S|MENU_HIDDENKEY}} <!--
 +
--><code>'''MENU HIDDENKEY''' ''key[,key...] command...''</code></div>
  
== MENU BACKGROUND ==
+
If "''key''" is used to interrupt MENU HIDDEN,
<code>'''MENU BACKGROUND''' ''background''</code>
+
then execute the specified command instead of displaying the menu.
  
For <tt>vesamenu.c32</tt>, set the background image. 
+
In addition to all single characters,
The ''background'' can either be a color (see <tt>[[#MENU_COLOR|{{nowrap|MENU COLOR}}]]</tt>) or the name of an image file, which should be the size of the screen (normally 640x480 pixels, but see <tt>{{nowrap|MENU RESOLUTION)}}</tt> and either in PNG, JPEG or LSS16 format.
+
plus the syntax {{nowrap|" <code>''^X''</code> "}} for {{nowrap|" [Ctrl-X] "}},  
 +
currently the following key names are recognized:
  
Note: When using an image file as ''background'', its resolution should match the values used in <tt>[[#MENU_RESOLUTION|{{nowrap|MENU RESOLUTION}}]]</tt>.
+
:<tt>Backspace, Tab, Enter, Esc, Space, F1..F12, Up, Down, <!--
 +
--> Left, Right, PgUp, PgDn, Home, End, Insert, Delete</tt>
  
 +
Note that single characters are treated as case-sensitive,
 +
so [A] and [a] can bind different commands.
 +
The same command can be bound to different keys
 +
by giving a comma-separated list of [[Directives/special keys#MENU HIDDENKEY|keys]]:
 +
<pre>
 +
menu hiddenkey A,a key_a_command
 +
</pre>
  
== MENU BEGIN ==
+
<br />
<!-- The following few lines shall start with at least -->
+
== MENU SHIFTKEY ==
<!-- one space character per line for wiki formatting. -->
+
{{S|MENU_SHIFTKEY}}
<!-- Do NOT use "pre" tags in the following few lines, -->
+
<code>'''MENU SHIFTKEY'''</code>
<!-- as "pre" does not parse wiki markup. -->
+
'''MENU BEGIN''' [''tagname'']<br />
+
'''MENU END'''
+
  
Begin/end a submenu. 
+
Exit the menu system immediately unless either the [Shift] or the [Alt]
The entries between <tt>MENU BEGIN</tt> and <tt>MENU END</tt> form a submenu, which is marked with a ">" mark on the right hand of the screen. 
+
[[Directives/special keys#MENU SHIFTKEY|key]] is pressed,  
Submenus inherit the properties of their parent menus, but can override them, and can thus have their own backgrounds, master passwords, titles, timeouts, messages and so forth.
+
or {{nowrap|[Caps Lock]}} or {{nowrap|[Scroll Lock]}} is set.
  
 +
<br />
 +
== MENU IMMEDIATE ==
 +
{{S|MENU_IMMEDIATE}}
 +
<code>'''MENU IMMEDIATE'''</code>
  
== MENU GOTO ==
+
Allow hotkeys to activate immediately without needing [Enter].
<code>'''MENU GOTO''' ''tagname''</code>
+
  
''(Only valid after a LABEL statement.)''<br />
+
<br />
Transfer to the named submenu instead of booting anything. 
+
== MENU CLEAR ==
To transfer to the top-level menu, specify {{nowrap|"<tt>menu goto .top</tt>".}}
+
{{S|MENU_CLEAR}}
 +
<code>'''MENU CLEAR'''</code>
  
 +
Clear the screen when exiting the menu, instead of leaving the menu displayed.
 +
For vesamenu, this means the graphical background is still displayed without the menu itself
 +
for as long as the screen remains in graphics mode.
  
== MENU EXIT ==
+
<br />
<code>'''MENU EXIT''' [''tagname'']</code>
+
== MENU RESOLUTION ==
 +
{{S|MENU_RESOLUTION}}
 +
<code>'''MENU RESOLUTION''' ''width height''</code>
  
''(Only valid after a LABEL statement inside <tt>MENU BEGIN ... MENU END</tt>)''<br />
+
Request a specific screen resolution when in graphics mode.  
Exit to the next higher menu, or, if ''tagname'' is specified, to the named menu.
+
The default is "640 480" corresponding to a resolution of 640x480 pixels,  
 +
which all VGA-compatible monitors should be able to display.
  
 +
If the specified resolution is unavailable, the text mode menu is displayed instead.
  
== MENU QUIT ==
+
<br />
<code>'''MENU QUIT'''</code>
+
== MENU BACKGROUND ==
 +
{{S|MENU_BACKGROUND}}
 +
<code>'''MENU BACKGROUND''' ''background''</code>
  
''(Only valid after a LABEL statement.)''<br />
+
For <tt>vesamenu.c32</tt>, set the background image.  
Quit the menu system.
+
The ''background'' can either be a color
 
+
(see <tt>[[#MENU COLOR|{{nowrap|MENU COLOR}}]]</tt>)  
'''WARNING''': Even if either {{nowrap|<tt>MENU MASTER PASSWD</tt>}} or {{nowrap|"<tt>ALLOWOPTIONS 0</tt>"}} is set, {{nowrap|<tt>MENU QUIT</tt>}} will still allow exiting to the CLI; however, a separate {{nowrap|<tt>MENU PASSWD</tt>}} can of course be set for this menu entry.
+
or the name of an image file,  
 
+
which should be the size of the screen
 
+
(normally 640x480 pixels,  
== MENU START ==
+
but see <tt>{{nowrap|MENU RESOLUTION)}}</tt>  
<code>'''MENU START'''</code>
+
and either in PNG, JPEG or LSS16 format.
 
+
''(Only valid inside MENU BEGIN ... MENU END)''<br />
+
Define the starting menu for the menu system, instead of starting at the top-level menu. 
+
See also the [[#DEFAULT]] directive.
+
 
+
 
+
== DEFAULT ==
+
<code>'''DEFAULT''' ''label''</code>
+
 
+
Set the global default. 
+
If "''label''" points into a submenu, that menu becomes the {{nowrap|''start menu''}}.
+
In other words, this directive has the same effect as both [[#MENU DEFAULT|{{nowrap|<tt>MENU DEFAULT</tt>}}]] and [[#MENU START|{{nowrap|<tt>MENU START</tt>}}]].
+
 
+
For backwards compatibility with earlier versions of Syslinux, this behavior is ignored unless the configuration file also contains a [[Config#UI|UI]] directive.
+
 
+
Note: the CLI accepts options after the ''label'', or even a non-label. 
+
The menu system does not support that.
+
  
 +
Note: When using an image file as ''background'',
 +
its resolution should match the values used in
 +
<tt>[[#MENU RESOLUTION|{{nowrap|MENU RESOLUTION}}]]</tt>. See
 +
[[Common Problems#Menu background|{{nowrap|Common Problems, Menu background}}]].
  
 +
<br />
 
== MENU SAVE ==
 
== MENU SAVE ==
 +
{{S|MENU_SAVE}}
 
<code>'''MENU SAVE'''</code><br />
 
<code>'''MENU SAVE'''</code><br />
 
<code>'''MENU NOSAVE'''</code>
 
<code>'''MENU NOSAVE'''</code>
  
Remember the last selected entry and make that one the ''default'' for the next boot.
+
Remember the last selected entry and make that one the ''default'' for the next boot.  
A password-protected menu entry is *<u>not</u>* saved.
+
A password-protected menu entry is *<u>not</u>* saved.  
This requires the ADV data storage mechanism, which is currently only implemented for EXTLINUX, although the other Syslinux derivatives will accept the command (and ignore it).
+
This requires the ADV data storage mechanism,  
 +
which is currently only implemented for <!-- SYSLINUX --> EXTLINUX,  
 +
although the other Syslinux derivatives will accept the command (and ignore it).
  
 
NOTE: <tt>MENU SAVE</tt> stores the <tt>LABEL</tt> tag of the selected entry.  
 
NOTE: <tt>MENU SAVE</tt> stores the <tt>LABEL</tt> tag of the selected entry.  
This mechanism therefore relies on <tt>LABEL</tt> tags being unique.
+
This mechanism therefore relies on <tt>LABEL</tt> tags being unique.  
 
On the other hand, it handles changes in the configuration file gracefully.
 
On the other hand, it handles changes in the configuration file gracefully.
  
NOTE: In software RAID-1 setups, <tt>MENU SAVE</tt> only stores the ''default'' label on the actual boot disk.
+
NOTE: In software RAID-1 setups,  
This may lead to inconsistent reads from the array, or unexpectedly change the default label after array resynchronization or disk failure.
+
<tt>MENU SAVE</tt> only stores the ''default'' label on the actual boot disk.  
 +
This may lead to inconsistent reads from the array,  
 +
or unexpectedly change the default label after array resynchronization or disk failure.
  
The <tt>MENU SAVE</tt> information can be fully cleared with {{nowrap|"<code>extlinux --reset-adv <bootdir></code>".}}
+
The <tt>MENU SAVE</tt> information can be fully cleared with  
 
+
{{nowrap|"<code>extlinux --reset-adv <''bootdir''></code>".}}
A <tt>MENU SAVE</tt> or <tt>MENU NOSAVE</tt> at the top of a {{nowrap|(sub)menu}} affects all entries underneath that {{nowrap|(sub)menu}} except those that in turn have {{nowrap|<tt>MENU SAVE</tt>}} or {{nowrap|<tt>MENU NOSAVE</tt>}} declared. 
+
This can be used to restrict which specific entries are allowed to be saved when selected.
+
 
+
 
+
== INCLUDE ==
+
<!-- Leaving a hidden manual "anchor". -->
+
<span id="#MENU_INCLUDE"></span>
+
<code>'''INCLUDE''' ''filename'' [''tagname'']</code><br />
+
<code>'''MENU INCLUDE''' ''filename'' [''tagname'']</code>
+
 
+
Include the contents of the ''filename'' configuration file at this point.
+
 
+
In the case of <tt>MENU INCLUDE</tt>, the included data is only seen by the menu system; the core Syslinux code does not parse this command, so any labels defined in it are unavailable.
+
 
+
If a ''tagname'' is included, the whole file is considered to have been bracketed with a {{nowrap|"<code>MENU BEGIN ''tagname'' ... MENU END</code>"}} pair, and will therefore show up as a submenu.
+
  
 +
A <tt>MENU SAVE</tt> or <tt>MENU NOSAVE</tt> at the top of a
 +
{{nowrap|(sub)menu}} affects all entries underneath that
 +
{{nowrap|(sub)menu}} except those that in turn have
 +
{{nowrap|<tt>MENU SAVE</tt>}} or {{nowrap|<tt>MENU NOSAVE</tt>}} declared.
 +
This can be used to restrict which specific entries are allowed to be saved when
 +
<!-- executed -->
 +
selected.
  
 +
<br />
 
== MENU AUTOBOOT ==
 
== MENU AUTOBOOT ==
 +
{{S|MENU_AUTOBOOT}}
 
<code>'''MENU AUTOBOOT''' ''message''</code>
 
<code>'''MENU AUTOBOOT''' ''message''</code>
  
Replace the message "''Automatic boot in # second{,s}...''".
+
Replace the message "''Automatic boot in # second{,s}...''".  
 
The "#" symbol is replaced with the number of remaining seconds.  
 
The "#" symbol is replaced with the number of remaining seconds.  
 
The syntax "<code>{singular,[dual,]plural}</code>" can be used to conjugate appropriately.
 
The syntax "<code>{singular,[dual,]plural}</code>" can be used to conjugate appropriately.
  
 
+
<br />
 
== MENU TABMSG ==
 
== MENU TABMSG ==
 +
{{S|MENU_TABMSG}}
 
<code>'''MENU TABMSG''' ''message''</code>
 
<code>'''MENU TABMSG''' ''message''</code>
  
 
Replace the message "''Press [Tab] to edit options''".
 
Replace the message "''Press [Tab] to edit options''".
  
 
+
<br />
 
== MENU NOTABMSG ==
 
== MENU NOTABMSG ==
 +
{{S|MENU_NOTABMSG}}
 
<code>'''MENU NOTABMSG''' ''message''</code>
 
<code>'''MENU NOTABMSG''' ''message''</code>
  
Take the place of the TABMSG message when the [Tab] key is not [[#ALLOWOPTIONS|allowed]], i.e. if the possibility to edit the command is disabled.
+
Take the place of the TABMSG message when the [Tab] key is not  
 +
[[#ALLOWOPTIONS|allowed]], i.e. if the possibility to edit the command is disabled.  
 
Defaults to blank.
 
Defaults to blank.
  
 
+
<br />
 
== MENU PASSPROMPT ==
 
== MENU PASSPROMPT ==
 +
{{S|MENU_PASSPROMPT}}
 
<code>'''MENU PASSPROMPT''' ''message''</code>
 
<code>'''MENU PASSPROMPT''' ''message''</code>
  
 
Replace the message "''Password required''".
 
Replace the message "''Password required''".
  
 
+
<br />
 
== MENU COLOR ==
 
== MENU COLOR ==
<code>'''MENU COLOR''' ''element ansi foreground background shadow''</code>
+
<div style=" white-space: pre; ">{{S|MENU_COLOR}} <!--
 +
--><code>'''MENU COLOR''' ''element ansi foreground background shadow''</code></div>
  
 
Set the color of element "''element''" to the specified color sequence:
 
Set the color of element "''element''" to the specified color sequence:
  
 +
{|
 +
<!-- |+ style="text-align: left; white-space: pre; " | <code> element: </code> -->
 +
|
 
<pre>
 
<pre>
screen    Rest of the screen
+
screen    Rest of the screen
border    Border area
+
border    Border area
title      Title bar
+
title      Title bar
unsel      Unselected menu item
+
unsel      Unselected menu item
hotkey    Unselected hotkey
+
hotkey    Unselected hotkey
sel        Selection bar
+
sel        Selection bar
hotsel    Selected hotkey
+
hotsel    Selected hotkey
disabled  Disabled menu item
+
disabled  Disabled menu item
scrollbar  Scroll bar
+
scrollbar  Scroll bar
tabmsg    Press [Tab] message
+
tabmsg    Press [Tab] message
cmdmark    Command line marker
+
cmdmark    Command line marker
cmdline    Command line
+
cmdline    Command line
pwdborder  Password box border
+
pwdborder  Password box border
pwdheader  Password box header
+
pwdheader  Password box header
pwdentry  Password box contents
+
pwdentry  Password box contents
timeout_msg Timeout message
+
timeout_msg Timeout message
timeout    Timeout counter
+
timeout    Timeout counter
help      Help text
+
help      Help text
msgXX      Message (F-key) file attribute XX
+
msgXX      Message (F-key) file attribute XX
 
</pre>
 
</pre>
 +
|}
  
 
... where XX is two hexadecimal digits (the "plain text" is 07).
 
... where XX is two hexadecimal digits (the "plain text" is 07).
  
"''ansi''" is a sequence of semicolon-separated ECMA-48 Set Graphics Rendition <nowiki>(<ESC>[m)</nowiki> sequences:
+
"''ansi''" is a sequence of semicolon-separated {{nowrap|ECMA-48}}
<!-- See http://en.wikipedia.org/wiki/ECMA-48#Colors -->
+
Set Graphics Rendition {{nowrap|(<code>&lt;ESC&gt;[m</code>)}} sequences:
<!-- and the SRG (Select Graphic Rendition) table just above the colors. -->
+
<!-- See http://en.wikipedia.org/wiki/ECMA-48#Colors --><!--
 +
--><!-- and the SRG (Select Graphic Rendition) table just above the colors. -->
 +
{|
 +
<!-- |+ style="text-align: left; white-space: pre; " | <code> ansi: </code> -->
 +
|
 
<pre>
 
<pre>
0    reset all attributes to their defaults
+
0    reset all attributes to their defaults
1    set bold
+
1    set bold
4    set underscore (simulated with color on a color display)
+
4    set underscore (simulated with color on a color display)
5    set blink
+
5    set blink
7    set reverse video
+
7    set reverse video
22    set normal intensity
+
22    set normal intensity
24    underline off
+
24    underline off
25    blink off
+
25    blink off
27    reverse video off
+
27    reverse video off
30    set black foreground
+
30    set black foreground
31    set red foreground
+
31    set red foreground
32    set green foreground
+
32    set green foreground
33    set brown foreground
+
33    set brown foreground
34    set blue foreground
+
34    set blue foreground
35    set magenta foreground
+
35    set magenta foreground
36    set cyan foreground
+
36    set cyan foreground
37    set white foreground
+
37    set white foreground
38    set underscore on, set default foreground color
+
38    set underscore on, set default foreground color
39    set underscore off, set default foreground color
+
39    set underscore off, set default foreground color
40    set black background
+
40    set black background
41    set red background
+
41    set red background
42    set green background
+
42    set green background
43    set brown background
+
43    set brown background
44    set blue background
+
44    set blue background
45    set magenta background
+
45    set magenta background
46    set cyan background
+
46    set cyan background
47    set white background
+
47    set white background
49    set default background color
+
49    set default background color
 
</pre>
 
</pre>
 +
|}
  
 
These are used (a) in text mode, and (b) on the serial console.
 
These are used (a) in text mode, and (b) on the serial console.
  
"''foreground''" and "''background''" are color codes in #AARRGGBB notation, where AA RR GG BB are hexadecimal digits for alpha (opacity), red, green and blue, respectively. <tt>#00000000</tt> represents fully transparent, and <tt>#ffffffff</tt> represents opaque white.
+
"''foreground''" and "''background''" are color codes in #AARRGGBB notation,  
 +
where AA RR GG BB are hexadecimal digits for  
 +
alpha (opacity), red, green and blue, respectively.  
 +
<tt>#00000000</tt> represents fully transparent,  
 +
and <tt>#ffffffff</tt> represents opaque white.
  
"''shadow''" controls the handling of the graphical console text shadow.
+
"''shadow''" controls the handling of the graphical console text shadow.  
Permitted values are "<tt>none</tt>" (no shadowing), "<tt>std</tt>" or "<tt>standard</tt>" (standard shadowing - foreground pixels are raised), "<tt>all</tt>" (both background and foreground raised), and "<tt>rev</tt>" or "<tt>reverse</tt>" (background pixels are raised.)
+
Permitted values are "<tt>none</tt>" (no shadowing),  
 
+
"<tt>std</tt>" or "<tt>standard</tt>" (standard shadowing -- foreground pixels are raised),  
If any field is set to "*" or omitted (at the end of the line) then that field is left unchanged.
+
"<tt>all</tt>" (both background and foreground raised),  
 +
and "<tt>rev</tt>" or "<tt>reverse</tt>" (background pixels are raised).
  
 +
If any field is set to "*" or omitted (at the end of the line)
 +
then that field is left unchanged.
  
 
The current defaults are:
 
The current defaults are:
 +
{|
 +
|
 +
<!-- --><!--
 +
--><!-- Do NOT use "pre" tags in the following few lines,
 +
--><!-- as "pre" does not parse wiki markup.
 +
--><!-- -->
 +
<nowiki>#</nowiki>'''MENU COLOR''' ''element ansi      foreground background shadow''
 +
|-
 +
|
 
<pre>
 
<pre>
menu color screen 37;40      #80ffffff #00000000 std
+
menu color screen 37;40      #80ffffff #00000000 std
menu color border 30;44      #40000000 #00000000 std
+
menu color border 30;44      #40000000 #00000000 std
menu color title 1;36;44    #c00090f0 #00000000 std
+
menu color title 1;36;44    #c00090f0 #00000000 std
menu color unsel 37;44      #90ffffff #00000000 std
+
menu color unsel 37;44      #90ffffff #00000000 std
menu color hotkey 1;37;44    #ffffffff #00000000 std
+
menu color hotkey 1;37;44    #ffffffff #00000000 std
menu color sel  7;37;40    #e0000000 #20ff8000 all
+
menu color sel  7;37;40    #e0000000 #20ff8000 all
menu color hotsel 1;7;37;40  #e0400000 #20ff8000 all
+
menu color hotsel 1;7;37;40  #e0400000 #20ff8000 all
menu color disabled 1;30;44    #60cccccc #00000000 std
+
menu color disabled 1;30;44    #60cccccc #00000000 std
menu color scrollbar 30;44      #40000000 #00000000 std
+
menu color scrollbar 30;44      #40000000 #00000000 std
menu color tabmsg 31;40      #90ffff00 #00000000 std
+
menu color tabmsg 31;40      #90ffff00 #00000000 std
menu color cmdmark 1;36;40    #c000ffff #00000000 std
+
menu color cmdmark 1;36;40    #c000ffff #00000000 std
menu color cmdline 37;40      #c0ffffff #00000000 std
+
menu color cmdline 37;40      #c0ffffff #00000000 std
menu color pwdborder 30;47      #80ffffff #20ffffff std
+
menu color pwdborder 30;47      #80ffffff #20ffffff std
menu color pwdheader 31;47      #80ff8080 #20ffffff std
+
menu color pwdheader 31;47      #80ff8080 #20ffffff std
menu color pwdentry 30;47      #80ffffff #20ffffff std
+
menu color pwdentry 30;47      #80ffffff #20ffffff std
menu color timeout_msg 37;40      #80ffffff #00000000 std
+
menu color timeout_msg 37;40      #80ffffff #00000000 std
menu color timeout 1;37;40    #c0ffffff #00000000 std
+
menu color timeout 1;37;40    #c0ffffff #00000000 std
menu color help 37;40      #c0ffffff #00000000 std
+
menu color help 37;40      #c0ffffff #00000000 std
menu color msg07 37;40      #90ffffff #00000000 std
+
menu color msg07 37;40      #90ffffff #00000000 std
 
</pre>
 
</pre>
 +
|}
  
 
+
<br />
 
== MENU MSGCOLOR ==
 
== MENU MSGCOLOR ==
<code>'''MENU MSGCOLOR''' ''fg_filter bg_filter shadow''</code>
+
<div style=" white-space: pre; ">{{S|MENU_MSGCOLOR}} <!--
 +
--><code>'''MENU MSGCOLOR''' ''fg_filter bg_filter shadow''</code></div>
  
Set <u>''all''</u> the msgXX colors to a color scheme derived from the ''fg_filter'' and ''bg_filter'' values.
+
Set <u>''all''</u> the msgXX colors to a color scheme  
Background color zero is always treated as transparent.
+
derived from the ''fg_filter'' and ''bg_filter'' values.  
 +
Background color zero is always treated as transparent.  
 
The default corresponds to:
 
The default corresponds to:
  
 
<pre>
 
<pre>
menu msgcolor #90ffffff #80ffffff std
+
menu msgcolor #90ffffff #80ffffff std
 
</pre>
 
</pre>
  
 
This directive should come before any directive that customizes individual msgXX colors.
 
This directive should come before any directive that customizes individual msgXX colors.
  
 
+
<br />
 
== Layout ==
 
== Layout ==
<!-- The following few lines shall start with at least -->
+
<!-- --><!--
<!-- one space character per line for wiki formatting. -->
+
--><!-- The following few lines shall start with at least  
<!-- Do NOT use "pre" tags in the following few lines, -->
+
--><!-- one space character per line for wiki formatting.  
<!-- as "pre" does not parse wiki markup. -->
+
--><!-- Do NOT use "pre" tags in the following few lines,  
 +
--><!-- as "pre" does not parse wiki markup.  
 +
--><!-- -->
 +
{|
 +
| style=" vertical-align: top; font-family: monospace; " | {{S|Layout}}
 +
|
 
  '''MENU WIDTH''' 80
 
  '''MENU WIDTH''' 80
 
  '''MENU MARGIN''' 10
 
  '''MENU MARGIN''' 10
Line 534: Line 712:
 
  '''MENU HSHIFT''' 0
 
  '''MENU HSHIFT''' 0
 
  '''MENU VSHIFT''' 0
 
  '''MENU VSHIFT''' 0
 +
|}
  
 
These options control the layout of the menu on the screen.<br />
 
These options control the layout of the menu on the screen.<br />
 
The values above are the defaults.
 
The values above are the defaults.
  
A negative value is relative to the calculated length of the screen (25 rows for text mode, 28 rows for VESA graphics mode.)
+
A negative value is relative to the calculated length of the screen  
 
+
(25 rows for text mode, 28 rows for VESA graphics mode).
  
 +
<br />
 
== F1..F12 ==
 
== F1..F12 ==
<!-- The following few lines shall start with at least -->
+
<!-- --><!--
<!-- one space character per line for wiki formatting. -->
+
--><!-- The following few lines shall start with at least  
<!-- Do NOT use "pre" tags in the following few lines, -->
+
--><!-- one space character per line for wiki formatting.  
<!-- as "pre" does not parse wiki markup. -->
+
--><!-- Do NOT use "pre" tags in the following few lines,  
  '''F1''' ''textfile'' [''background'']<br />
+
--><!-- as "pre" does not parse wiki markup.  
  ...<br />
+
--><!-- -->
 +
{|
 +
| style=" vertical-align: top; font-family: monospace; " | {{S|F1..F12}}
 +
|
 +
  '''F1''' ''textfile'' [''background'']
 +
  ...
 
  '''F12''' ''textfile'' [''background'']
 
  '''F12''' ''textfile'' [''background'']
 +
|}
  
Display full-screen help (also available at the command line).  
+
Display full-screen help (also available at the [[Config#F1..F12|command line]]).  
The same control code sequences as in the command line interface are supported, although some are ignored.
+
The same control code sequences as in the command line interface are supported,  
 +
although some are ignored.
  
Additionally, an optional second argument allows a different ''background'' image to be displayed by {{nowrap|<tt>vesamenu.c32</tt>}} (see <tt>[[Menu#MENU_BACKGROUND|{{nowrap|MENU BACKGROUND}}]]</tt> for supported formats). The CLI and <tt>menu.c32</tt> will ignore the second argument.
+
Additionally, an optional second argument allows a different ''background'' image  
 +
to be displayed by {{nowrap|<tt>vesamenu.c32</tt>}}  
 +
(see <tt>[[#MENU BACKGROUND|{{nowrap|MENU BACKGROUND}}]]</tt> for supported formats).  
 +
The CLI and <tt>menu.c32</tt> will ignore the second argument.
 +
 
 +
<br />
  
 
== MENU HELP ==
 
== MENU HELP ==
 +
{{S|MENU_HELP}}
 
<code>'''MENU HELP''' ''textfile'' [''background'']</code>
 
<code>'''MENU HELP''' ''textfile'' [''background'']</code>
  
Create a menu entry which, when selected, displays full-screen help in the same way as the {{nowrap|<tt>F-key</tt>}} help.
+
Create a menu entry which, when selected,  
 
+
displays full-screen help in the same way as the {{nowrap|<tt>F-key</tt>}} help.
 
+
== TIMEOUT ==
+
The menu system honours the <tt>TIMEOUT</tt> command.
+
If <tt>TIMEOUT</tt> is specified, it will execute the <tt>ONTIMEOUT</tt> command if one exists, otherwise it will pick the <tt>DEFAULT</tt> menu option. 
+
'''WARNING''': the <tt>TIMEOUT</tt> action will bypass password protection even if one is set for the specified <tt>ONTIMEOUT</tt> or <tt>DEFAULT</tt> entry!
+
 
+
 
+
== ALLOWOPTIONS ==
+
Normally, users can press [Tab] to edit the menu entry, and [Esc] to return to the Syslinux command line. 
+
However, if the configuration file specifies {{nowrap|"<tt>ALLOWOPTIONS 0</tt>"}}, these keys will be disabled, and if {{nowrap|<tt>MENU MASTER PASSWD</tt>}} is set, they require the master password.
+
 
+
  
 +
<br />
 
== SERIAL ==
 
== SERIAL ==
The simple menu system supports serial console, using the normal <tt>SERIAL</tt> directive.
+
The simple menu system supports serial console, using the normal <tt>SERIAL</tt> directive.  
However, it can be quite slow over a slow serial link; you probably want to set your baudrate to 38400 or higher if possible.
+
However, it can be quite slow over a slow serial link;  
 +
you probably want to set your baudrate to 38400 or higher if possible.  
 
It requires a Linux/VT220/ANSI-compatible terminal on the other end.
 
It requires a Linux/VT220/ANSI-compatible terminal on the other end.
  
 +
See also [[Config#SERIAL]].
  
 
+
<br /><br />
 
== Alternative configuration file ==
 
== Alternative configuration file ==
It is also possible to load a secondary configuration file, to get to another menu.
+
It is also possible to load a secondary configuration file, to get to another menu.  
 
To do that, invoke <tt>[vesa]menu.c32</tt> with the name of the secondary configuration file.
 
To do that, invoke <tt>[vesa]menu.c32</tt> with the name of the secondary configuration file.
  
 
<pre>
 
<pre>
LABEL othermenu
+
LABEL othermenu
MENU LABEL Another Menu
+
  MENU LABEL Another Menu
KERNEL menu.c32
+
  KERNEL menu.c32
APPEND othermenu.cfg
+
  APPEND othermenu.cfg
 
</pre>
 
</pre>
  
If more than one file is specified, they will all be read, in the same specified order.
+
If more than one file is specified, they will all be read, in the same specified order.
  
 
The dummy filename "~" (tilde) is replaced with the filename of the main configuration file.
 
The dummy filename "~" (tilde) is replaced with the filename of the main configuration file.
  
 
<pre>
 
<pre>
# The file graphics.cfg contains common color and layout commands for
+
# The file graphics.cfg contains common  
# all menus.
+
# color and layout commands for all menus.
LABEL othermenu
+
LABEL othermenu
MENU LABEL Another Menu
+
  MENU LABEL Another Menu
KERNEL vesamenu.c32
+
  KERNEL vesamenu.c32
APPEND graphics.cfg othermenu.cfg
+
  APPEND graphics.cfg othermenu.cfg
 
+
# Return to the main menu
+
# Return to the main menu
LABEL mainmenu
+
LABEL mainmenu
MENU LABEL Return to Main Menu
+
  MENU LABEL Return to Main Menu
KERNEL vesamenu.c32
+
  KERNEL vesamenu.c32
APPEND graphics.cfg ~
+
  APPEND graphics.cfg ~
 
</pre>
 
</pre>
  
In addition to <tt>[vesa]menu.c32</tt>, there are other directives that might be of interest when using more than one configuration {{nowrap|file :}}<br />
+
In addition to <tt>[vesa]menu.c32</tt>,  
 +
there are (other) directives that might be of interest  
 +
when using more than one configuration file&nbsp;:
 +
 
 
<tt>UI</tt><br />
 
<tt>UI</tt><br />
 
<tt>[MENU] INCLUDE</tt><br />
 
<tt>[MENU] INCLUDE</tt><br />
Line 622: Line 810:
 
== See also ==
 
== See also ==
  
* [[Syslinux 4 Changelog|Syslinux 4 Changelog]]
+
* [[Config|How do I configure Syslinux]]
* [[SYSLINUX#How do I Configure SYSLINUX.3F|How do I Configure SYSLINUX]]
+
 
<!-- The following note and corresponding links are intentionally displayed -->
 
<!-- The following note and corresponding links are intentionally displayed -->
 
<!-- with a very small size font, as these are "old news" by now. -->
 
<!-- with a very small size font, as these are "old news" by now. -->
* <font size=1>Note that since version 3.74, the <tt>DEFAULT</tt> directive usage has changed; <tt>UI</tt> can be used instead. See [[News-3.74#UI mode|UI mode]] or [[Syslinux 3 Changelog#Changes in 3.74|Changes in 3.74]].</font size>
+
* <font size="1">Note that since version 3.74, <!--
 +
--> the <tt>DEFAULT</tt> directive usage has changed; <!--
 +
--> <tt>UI</tt> can be used instead. <!--
 +
--> See [[News-3.74#UI mode|UI mode]] or <!--
 +
--> [[Syslinux 3 Changelog#Changes in 3.74|Changes in 3.74]].</font>

Latest revision as of 01:20, 24 April 2020

Introduction

There are two menu systems included with Syslinux, the advanced menu system, and the simple menu system.


The advanced menu system

The advanced menu system, written by Murali Krishnan Ganapathy, is located in the com32/cmenu/ sub-directory. It allows the user to create hierarchical sub-menus, dynamic options, check-boxes, and just about anything. It requires the menu to be compiled from a simple C file (see com32/cmenu/simple.c and com32/cmenu/complex.c for examples).

The advanced menu system does not support serial console at this time.

See com32/cmenu/README for more information.


The simple menu system

The simple menu system is based on a module located at com32/menu/vesamenu.c32 (graphical) or com32/menu/menu.c32 (text mode only). It uses the same configuration file as the regular Syslinux command line, and displays all the LABEL statements.

To use the menu system, simply make sure [vesa]menu.c32 is in the appropriate location for the boot medium (the same directory as the configuration file for SYSLINUX, EXTLINUX and ISOLINUX, and the same directory as pxelinux.0 for PXELINUX), and put the following options in the configuration file :

 DEFAULT menu.c32
 PROMPT 0

Another alternative, using the UI directive:

 UI menu.c32

There are a few menu additions to the configuration file, all starting with the keywords MENU or TEXT. As the rest of the Syslinux configuration file language, it is case-insensitive.

The remaining of this document is a reference of the directives that are relevant in the Simple Menu System.


MENU LABEL

§  MENU LABEL label

(Only valid after a LABEL statement)
Change the label displayed for a specific menu entry. Display a label that is not suitable for the command line. For example:

 # Soft Cap Linux
 LABEL softcap
  MENU LABEL Soft Cap ^Linux 9.6.36
  KERNEL softcap-9.6.36.bzi
  APPEND whatever
 
 # A very dense operating system
 LABEL brick
  MENU LABEL ^Windows CE/ME/NT
  KERNEL chain.c32
  APPEND hd0 2

The caret symbol (^) in a MENU LABEL statement defines a hotkey. Hotkeys are highlighted in the menu. When a hotkey is pressed, the cursor will move to the corresponding menu entry. If MENU IMMEDIATE is present, then when a hotkey is pressed the corresponding menu entry will be directly launched.

Reusing hotkeys has no effect on subsequent entries; they will not be highlighted, and the cursor will not move again.

Keep in mind that the LABELs, not MENU LABELs, must be unique, or odd things will happen to the command-line.


MENU INDENT

§  MENU INDENT count

(Only valid after a LABEL statement)
Add "count" spaces in front of the displayed menu entry.


MENU SEPARATOR

§  MENU SEPARATOR

Insert an empty line in the menu.


MENU DISABLE

§  MENU DISABLE

(Only valid after a LABEL statement)
Make the entry unselectable. This allows to display a section in the menu with different options below it. For example:

 # Entries for network boots
 LABEL -
  MENU LABEL Network:
  MENU DISABLE
 
 # Soft Cap Linux
 LABEL softcap
  MENU LABEL Soft Cap ^Linux 9.6.36
  MENU INDENT 1
  KERNEL softcap-9.6.36.bzi
  APPEND whatever
 
 # Dos 6.22
 LABEL dos
  MENU LABEL ^Dos 6.22
  MENU INDENT 1
  KERNEL memdisk
  APPEND initrd=dos622.imz
 
 # Separator
 MENU SEPARATOR
 
 # Entries for local boots
 LABEL -
  MENU LABEL Local:
  MENU DISABLE
 
 # Windows 2000
 LABEL w2k
  MENU LABEL ^Windows 2000
  MENU INDENT 1
  KERNEL chain.c32
  APPEND hd0 1
 
 # Windows XP
 LABEL xp
  MENU LABEL Windows ^XP
  MENU INDENT 1
  KERNEL chain.c32
  APPEND hd0 2


MENU HIDE

§  MENU HIDE

(Only valid after a LABEL statement)
Suppress a particular LABEL entry from the menu.


TEXT HELP

§ 
TEXT HELP
Help text ... ... which can span multiple lines
ENDTEXT

(Only valid after a LABEL statement)
Specify a help text that should be displayed when a particular menu entry is highlighted.


MENU BEGIN

§ 
MENU BEGIN [tagname]
MENU END

Begin/end a submenu. The entries between MENU BEGIN and MENU END form a submenu, which is marked with a ">" mark on the right hand of the screen. Submenus inherit the properties of their parent menus, but can override them, and can thus have their own backgrounds, master passwords, titles, timeouts, messages and so forth.


MENU GOTO

§  MENU GOTO tagname

(Only valid after a LABEL statement)
Transfer to the named submenu instead of booting anything. To transfer to the top-level menu, specify "menu goto .top".


MENU EXIT

§  MENU EXIT [tagname]

(Only valid after a LABEL statement inside MENU BEGIN ... MENU END)
Exit to the next higher menu, or, if tagname is specified, to the named menu.


MENU QUIT

§  MENU QUIT

(Only valid after a LABEL statement)
Quit the menu system.

WARNING: Even if either MENU MASTER PASSWD or "ALLOWOPTIONS 0" is set, MENU QUIT will still allow exiting to the CLI; however, a separate MENU PASSWD can of course be set for this menu entry.


MENU START

§  MENU START

(Only valid inside MENU BEGIN ... MENU END)
Define the starting menu for the menu system, instead of starting at the top-level menu. See also the #DEFAULT directive.


MENU DEFAULT

§  MENU DEFAULT

(Only valid after a LABEL statement)
The particular menu entry is considered the default for the particular (sub)menu. If no default is specified, use the first one. See also the #DEFAULT directive.


DEFAULT

§  DEFAULT label

Set the global default. If "label" points into a submenu, that menu becomes the start menu. In other words, this directive has the same effect as both MENU DEFAULT and MENU START.

For backwards compatibility with earlier versions of Syslinux, this behavior is ignored unless the configuration file also contains a UI directive.

Note: the CLI accepts options after the label, or even a non-label. The menu system does not support that.


TIMEOUT

The menu system honours the TIMEOUT command. If TIMEOUT is specified, it will execute the ONTIMEOUT command if one exists, otherwise it will pick the DEFAULT menu option. WARNING: the TIMEOUT action will bypass password protection even if one is set for the specified ONTIMEOUT or DEFAULT entry!


ALLOWOPTIONS

Normally, users can press [Tab] to edit the menu entry, and [Esc] to return to the Syslinux command line. However, if the configuration file specifies "ALLOWOPTIONS 0", these keys will be disabled, and if MENU MASTER PASSWD is set, they require the master password.


INCLUDE

§  INCLUDE filename [tagname]
§  MENU INCLUDE filename [tagname]

Include the contents of the filename configuration file at this point.

In the case of MENU INCLUDE, the included data is only seen by the menu system; the core Syslinux code does not parse this command, so any labels defined in it are unavailable.

If a tagname is included, the whole file is considered to have been bracketed with a "MENU BEGIN tagname ... MENU END" pair, and will therefore show up as a submenu.


MENU PASSWD

§  MENU PASSWD passwd

(Only valid after a LABEL statement or a MENU BEGIN statement)
Set a password on this menu entry. "passwd" can be either a cleartext password or a password encrypted with one of the following algorithms:

 MD5      	(Signature: $1$)
 SHA-1    	(Signature: $4$)
 SHA-2-256	(Signature: $5$)
 SHA-2-512	(Signature: $6$)

Use the included Perl scripts "sha1pass" or "md5pass" to encrypt passwords. MD5 passwords are compatible with most Unix password file utilities; SHA-1 passwords are probably unique to Syslinux; SHA-2 passwords are compatible with very recent Linux distributions. Obviously, if you don't encrypt your passwords they will not be very secure at all.

If using passwords, make sure to use "NOESCAPE 1" and "PROMPT 0", and either set "ALLOWOPTIONS 0" or use a master password.

If passwd is an empty string, this menu entry can only be unlocked with the master password.


MENU MASTER PASSWD

§  MENU MASTER PASSWD passwd

Set a master password. This password can be used to boot any menu entry. If this directive is used, then the master password is also required for the [Tab] and [Esc] keys to work.


MENU TITLE

§  MENU TITLE title

Give the menu a title. The title is presented at the top of the menu.


MENU HIDDEN

§  MENU HIDDEN

Do not display the actual menu unless the user presses a key. All that is displayed is a timeout message.


MENU HIDDENKEY

§  MENU HIDDENKEY key[,key...] command...

If "key" is used to interrupt MENU HIDDEN, then execute the specified command instead of displaying the menu.

In addition to all single characters, plus the syntax " ^X " for " [Ctrl-X] ", currently the following key names are recognized:

Backspace, Tab, Enter, Esc, Space, F1..F12, Up, Down, Left, Right, PgUp, PgDn, Home, End, Insert, Delete

Note that single characters are treated as case-sensitive, so [A] and [a] can bind different commands. The same command can be bound to different keys by giving a comma-separated list of keys:

 menu hiddenkey A,a key_a_command


MENU SHIFTKEY

§  MENU SHIFTKEY

Exit the menu system immediately unless either the [Shift] or the [Alt] key is pressed, or [Caps Lock] or [Scroll Lock] is set.


MENU IMMEDIATE

§  MENU IMMEDIATE

Allow hotkeys to activate immediately without needing [Enter].


MENU CLEAR

§  MENU CLEAR

Clear the screen when exiting the menu, instead of leaving the menu displayed. For vesamenu, this means the graphical background is still displayed without the menu itself for as long as the screen remains in graphics mode.


MENU RESOLUTION

§  MENU RESOLUTION width height

Request a specific screen resolution when in graphics mode. The default is "640 480" corresponding to a resolution of 640x480 pixels, which all VGA-compatible monitors should be able to display.

If the specified resolution is unavailable, the text mode menu is displayed instead.


MENU BACKGROUND

§  MENU BACKGROUND background

For vesamenu.c32, set the background image. The background can either be a color (see MENU COLOR) or the name of an image file, which should be the size of the screen (normally 640x480 pixels, but see MENU RESOLUTION) and either in PNG, JPEG or LSS16 format.

Note: When using an image file as background, its resolution should match the values used in MENU RESOLUTION. See Common Problems, Menu background.


MENU SAVE

§  MENU SAVE
MENU NOSAVE

Remember the last selected entry and make that one the default for the next boot. A password-protected menu entry is *not* saved. This requires the ADV data storage mechanism, which is currently only implemented for EXTLINUX, although the other Syslinux derivatives will accept the command (and ignore it).

NOTE: MENU SAVE stores the LABEL tag of the selected entry. This mechanism therefore relies on LABEL tags being unique. On the other hand, it handles changes in the configuration file gracefully.

NOTE: In software RAID-1 setups, MENU SAVE only stores the default label on the actual boot disk. This may lead to inconsistent reads from the array, or unexpectedly change the default label after array resynchronization or disk failure.

The MENU SAVE information can be fully cleared with "extlinux --reset-adv <bootdir>".

A MENU SAVE or MENU NOSAVE at the top of a (sub)menu affects all entries underneath that (sub)menu except those that in turn have MENU SAVE or MENU NOSAVE declared. This can be used to restrict which specific entries are allowed to be saved when selected.


MENU AUTOBOOT

§  MENU AUTOBOOT message

Replace the message "Automatic boot in # second{,s}...". The "#" symbol is replaced with the number of remaining seconds. The syntax "{singular,[dual,]plural}" can be used to conjugate appropriately.


MENU TABMSG

§  MENU TABMSG message

Replace the message "Press [Tab] to edit options".


MENU NOTABMSG

§  MENU NOTABMSG message

Take the place of the TABMSG message when the [Tab] key is not allowed, i.e. if the possibility to edit the command is disabled. Defaults to blank.


MENU PASSPROMPT

§  MENU PASSPROMPT message

Replace the message "Password required".


MENU COLOR

§  MENU COLOR element ansi foreground background shadow

Set the color of element "element" to the specified color sequence:

 screen     	Rest of the screen
 border     	Border area
 title      	Title bar
 unsel      	Unselected menu item
 hotkey     	Unselected hotkey
 sel        	Selection bar
 hotsel     	Selected hotkey
 disabled   	Disabled menu item
 scrollbar  	Scroll bar
 tabmsg     	Press [Tab] message
 cmdmark    	Command line marker
 cmdline    	Command line
 pwdborder  	Password box border
 pwdheader  	Password box header
 pwdentry   	Password box contents
 timeout_msg	Timeout message
 timeout    	Timeout counter
 help       	Help text
 msgXX      	Message (F-key) file attribute XX

... where XX is two hexadecimal digits (the "plain text" is 07).

"ansi" is a sequence of semicolon-separated ECMA-48 Set Graphics Rendition (<ESC>[m) sequences:

 0     reset all attributes to their defaults
 1     set bold
 4     set underscore (simulated with color on a color display)
 5     set blink
 7     set reverse video
 22    set normal intensity
 24    underline off
 25    blink off
 27    reverse video off
 30    set black foreground
 31    set red foreground
 32    set green foreground
 33    set brown foreground
 34    set blue foreground
 35    set magenta foreground
 36    set cyan foreground
 37    set white foreground
 38    set underscore on, set default foreground color
 39    set underscore off, set default foreground color
 40    set black background
 41    set red background
 42    set green background
 43    set brown background
 44    set blue background
 45    set magenta background
 46    set cyan background
 47    set white background
 49    set default background color

These are used (a) in text mode, and (b) on the serial console.

"foreground" and "background" are color codes in #AARRGGBB notation, where AA RR GG BB are hexadecimal digits for alpha (opacity), red, green and blue, respectively. #00000000 represents fully transparent, and #ffffffff represents opaque white.

"shadow" controls the handling of the graphical console text shadow. Permitted values are "none" (no shadowing), "std" or "standard" (standard shadowing -- foreground pixels are raised), "all" (both background and foreground raised), and "rev" or "reverse" (background pixels are raised).

If any field is set to "*" or omitted (at the end of the line) then that field is left unchanged.

The current defaults are:

#MENU COLOR element	ansi      foreground background shadow
 menu color screen	37;40      #80ffffff #00000000 std
 menu color border	30;44      #40000000 #00000000 std
 menu color title	1;36;44    #c00090f0 #00000000 std
 menu color unsel	37;44      #90ffffff #00000000 std
 menu color hotkey	1;37;44    #ffffffff #00000000 std
 menu color sel  	7;37;40    #e0000000 #20ff8000 all
 menu color hotsel	1;7;37;40  #e0400000 #20ff8000 all
 menu color disabled	1;30;44    #60cccccc #00000000 std
 menu color scrollbar	30;44      #40000000 #00000000 std
 menu color tabmsg	31;40      #90ffff00 #00000000 std
 menu color cmdmark	1;36;40    #c000ffff #00000000 std
 menu color cmdline	37;40      #c0ffffff #00000000 std
 menu color pwdborder	30;47      #80ffffff #20ffffff std
 menu color pwdheader	31;47      #80ff8080 #20ffffff std
 menu color pwdentry	30;47      #80ffffff #20ffffff std
 menu color timeout_msg	37;40      #80ffffff #00000000 std
 menu color timeout	1;37;40    #c0ffffff #00000000 std
 menu color help 	37;40      #c0ffffff #00000000 std
 menu color msg07	37;40      #90ffffff #00000000 std


MENU MSGCOLOR

§  MENU MSGCOLOR fg_filter bg_filter shadow

Set all the msgXX colors to a color scheme derived from the fg_filter and bg_filter values. Background color zero is always treated as transparent. The default corresponds to:

 menu msgcolor #90ffffff #80ffffff std

This directive should come before any directive that customizes individual msgXX colors.


Layout

§ 
MENU WIDTH 80
MENU MARGIN 10
MENU PASSWORDMARGIN 3
MENU ROWS 12
MENU TABMSGROW 18
MENU CMDLINEROW 18
MENU ENDROW -1
MENU PASSWORDROW 11
MENU TIMEOUTROW 20
MENU HELPMSGROW 22
MENU HELPMSGENDROW -1
MENU HIDDENROW -2
MENU HSHIFT 0
MENU VSHIFT 0

These options control the layout of the menu on the screen.
The values above are the defaults.

A negative value is relative to the calculated length of the screen (25 rows for text mode, 28 rows for VESA graphics mode).


F1..F12

§ 
F1 textfile [background]
...
F12 textfile [background]

Display full-screen help (also available at the command line). The same control code sequences as in the command line interface are supported, although some are ignored.

Additionally, an optional second argument allows a different background image to be displayed by vesamenu.c32 (see MENU BACKGROUND for supported formats). The CLI and menu.c32 will ignore the second argument.


MENU HELP

§  MENU HELP textfile [background]

Create a menu entry which, when selected, displays full-screen help in the same way as the F-key help.


SERIAL

The simple menu system supports serial console, using the normal SERIAL directive. However, it can be quite slow over a slow serial link; you probably want to set your baudrate to 38400 or higher if possible. It requires a Linux/VT220/ANSI-compatible terminal on the other end.

See also Config#SERIAL.



Alternative configuration file

It is also possible to load a secondary configuration file, to get to another menu. To do that, invoke [vesa]menu.c32 with the name of the secondary configuration file.

 LABEL othermenu
  MENU LABEL Another Menu
  KERNEL menu.c32
  APPEND othermenu.cfg

If more than one file is specified, they will all be read, in the same specified order.

The dummy filename "~" (tilde) is replaced with the filename of the main configuration file.

 # The file graphics.cfg contains common 
 # color and layout commands for all menus.
 LABEL othermenu
  MENU LABEL Another Menu
  KERNEL vesamenu.c32
  APPEND graphics.cfg othermenu.cfg
 
 # Return to the main menu
 LABEL mainmenu
  MENU LABEL Return to Main Menu
  KERNEL vesamenu.c32
  APPEND graphics.cfg ~

In addition to [vesa]menu.c32, there are (other) directives that might be of interest when using more than one configuration file :

UI
[MENU] INCLUDE
MENU BEGIN ... MENU END
MENU GOTO
MENU EXIT
DEFAULT
MENU DEFAULT
MENU START
CONFIG

See also