MENU.4TH(7) | Standards, Environments, and Macros | MENU.4TH(7) |
menu.4th
— loader
dynamic menu boot module
The file that goes by the name of menu.4th
is a set of commands designed to display a dynamic menu system managed
through a system of carefully named environment variables. The commands of
menu.4th
by themselves are not enough for most uses.
Please refer to the examples below for the most common situations, and to
loader(7) for additional commands.
Before using any of the commands provided in
menu.4th
, it must be included through the
command:
include menu.4th
This line is present in the default /boot/forth/menu.rc file, so it is not needed (and should not be re-issued) in a normal setup.
The commands provided by it are:
menu-erase
and then redraws the menu.menu-unset
and then
menu-erase
.The environment variables that effect its behavior are:
NO
” (case-insensitive) or
“0
”, causes the menu to be displayed
without color. The default is to use ANSI coloring whenever possible. If
serial boot is enabled, color is disabled by default. Color features
include the use of ANSI bold for numbers appearing to the left of
menuitems and the use of special
“ansi
” variables described
below.menu-display
will wait before
executing menu_timeout_command
(boot
by default) unless a key is pressed. If set
to “NO
” (case-insensitive)
menu-display
will wait for user input and never
execute menu_timeout_command
. If set to
“-1
”,
menu-display
will boot immediately, preventing
both interruption of the autoboot
process and
escaping to the loader prompt. Default is
“10
”. See
loader(7) for additional
information.boot
.single
” (the default),
“double
”, and
“none
”.Welcome to FreeBSD
”.loader_menu_title
centered
above the menu. This can be set to
“left
” or
“right
” to instead display the title
left-or-right justified (respectively).x
”.x
” is pressed. See the list of
included FICL words below for some ideas.x
”. When pressed, will cause the
execution of menu_command[x].x
”
instead of menu_caption[x].toggle_menuitem
” (or a derivative
thereof), the text displayed will toggle between this and
menu_caption[x].cycle_menuitem
” (or a derivative
thereof), the text displayed will cycle between this and other
menu_caption[x][y] entries.x
” associated
with a given menuitem, that menuitem will allow to select
acpi-user-options (see
eeprom(8)).x
”, a single
blank-line and an “Options
” header
are inserted between menu_caption[x-1] and
menu_caption[x] (if configured).Reboot
”
menuitem to the end of the last configured menuitem. If
menu_options is configured, the
“Reboot
” menuitem will be inserted
before the “Options” separator.In addition, it provides the following FICL words:
arch-i386?
(-- BOOL
)acpipresent?
(-- BOOL
)acpienabled?
(-- BOOL
)N
” between
menu_caption[x] and
toggled_text[x] (where
“N
” represents the ASCII decimal
value for “x
”).N
” between
menu_caption[x][y] entries (where
N represents the ASCII decimal value for
x).For all values of “x
” above,
use any number between 1 through 9. Sorry, double-digits are not currently
supported.
A simple boot menu:
include /boot/forth/menu.4th menu-init set menu_caption[1]="Boot" set menu_command[1]="boot" set menu_options=2 set menu_caption[2]="Option: NO" set toggled_text[2]="Option: YES" set menu_command[2]="toggle_menuitem" set menu_timeout_command="boot" set menu_reboot menu-display
loader.conf(5), beastie.4th(7), loader(7), loader.4th(7), eeprom(8)
July 20, 2018 | OmniOS |