Linux & C.

Se hai Problemi o vuoi Segnalare News, Patch o Hints del mondo Linux e S.O. Alternativi
Friday, 2 April 2010, 04:16
L'avatar di  Duilio
 Località: Tarnax IV
 Età: 58
 Messaggi: 27,901

Syslinux - Isolinux

Sto facendo un po di esperimenti coi menu e mi serviva un parcheggio perche' tra un boot e l'altro non so mai su che macchina lascio le cose.

Almeno qui le trovo

come da istruzioni:

The Syslinux Project

A suite of bootloaders for Linux

Copyright 1994-2009 H. Peter Anvin and contributors

This program is provided under the terms of the GNU General Public
License, version 2 or, at your option, any later version. There is no
warranty, neither expressed nor implied, to the function of this
program. Please see the included file COPYING for details.


Syslinux now has a home page at


The Syslinux suite contains the following boot loaders
("derivatives"), for their respective boot media:

SYSLINUX - MS-DOS/Windows FAT filesystem
PXELINUX - PXE network booting
EXTLINUX - Linux ext2/ext3 filesystem

For historical reasons, some of the sections in this document applies
to the FAT loader (SYSLINUX) only; see pxelinux.txt, isolinux.txt and
extlinux.txt for what differs in these versions. The all-caps term
"SYSLINUX" generally refers to the FAT loader, whereas "Syslinux"
refers to the project as a whole.

Help with cleaning up the docs would be greatly appreciated.

++++ Options ++++

These are the options common to all versions of Syslinux:

-s Safe, slow, stupid; uses simpler code that boots better
-f Force installing
-r Raid mode. If boot fails, tell the BIOS to boot the next
device in the boot sequence (usually the next hard disk)
instead of stopping with an error message.
This is useful for RAID-1 booting.

These are only in the Windows version:

-m Mbr; install a bootable MBR sector to the beginning of the
-a Active; marks the partition used active (=bootable)


In order to create a bootable Linux floppy using SYSLINUX, prepare a
normal MS-DOS formatted floppy. Copy one or more Linux kernel files to
it, then execute the DOS command:

syslinux [-sfrma][-d directory] a: [bootsecfile]

(or whichever drive letter is appropriate; the [] meaning optional.)

Use "" (in the dos subdirectory of the distribution) for
plain DOS (MS-DOS, DR-DOS, PC-DOS, FreeDOS...) or Win9x/ME.

Use "syslinux.exe" (in the win32 subdirectory of the distribution) for

Under Linux, execute the command:

syslinux [-sfr][-d directory][-o offset] /dev/fd0

(or, again, whichever device is the correct one.)

This will alter the boot sector on the disk and copy a file named
LDLINUX.SYS into its root directory (or a subdirectory, if the -d
option is specified.)

The -s option, if given, will install a "safe, slow and stupid"
version of SYSLINUX. This version may work on some very buggy BIOSes
on which SYSLINUX would otherwise fail. If you find a machine on
which the -s option is required to make it boot reliably, please send
as much info about your machine as you can, and include the failure

The -o option is used with a disk image file and specifies the byte
offset of the filesystem image in the file.

For the DOS and Windows installers, the -m and -a options can be used
on hard drives to write a Master Boot Record (MBR), and to mark the
specific partition active.

On boot time, by default, the kernel will be loaded from the image named
LINUX on the boot floppy. This default can be changed, see the section
on the Syslinux config file.

If the Shift or Alt keys are held down during boot, or the Caps or Scroll
locks are set, Syslinux will display a LILO-style "boot:" prompt. The
user can then type a kernel file name followed by any kernel parameters.
The Syslinux loader does not need to know about the kernel file in
advance; all that is required is that it is a file located in the root
directory on the disk.

There are two versions of the Linux installer; one in the "mtools"
directory which requires no special privilege (other than write
permission to the device where you are installing) but requires the
mtools program suite to be available, and one in the "unix" directory
which requires root privilege.


All the configurable defaults in SYSLINUX can be changed by putting a
file called "syslinux.cfg" in the root directory of the boot disk.

This is a text file in either UNIX or DOS format, containing one or
more of the following items (case is insensitive for keywords; upper
case is used here to indicate that a word should be typed verbatim):

Starting with version 3.35, the configuration file can also be in
either the /boot/syslinux or /syslinux directories (searched in that
order.) If that is the case, then all filenames are assumed to be
relative to that same directory, unless preceded with a slash or

All options here applies to PXELINUX, ISOLINUX and EXTLINUX as well as
SYSLINUX unless otherwise noted. See the respective .txt files.

# comment
A comment line. The whitespace after the hash mark is mandatory.

INCLUDE filename
Inserts the contents of another file at this point in the
configuration file. Files can currently be nested up to 16
levels deep, but it is not guaranteed that more than 8 levels
will be supported in the future.

DEFAULT kernel options...
Sets the default command line. If Syslinux boots automatically,
it will act just as if the entries after DEFAULT had been typed
in at the "boot:" prompt.

If no configuration file is present, or no DEFAULT entry is
present in the config file, the default is "linux auto".

NOTE: Earlier versions of Syslinux used to automatically
append the string "auto" to whatever the user specified using
the DEFAULT command. As of version 1.54, this is no longer
true, as it caused problems when using a shell as a substitute
for "init." You may want to include this option manually.

UI module options...
Selects a specific user interface module (typically menu.c32
or vesamenu.c32). The command-line interface treats this as a
directive that overrides the DEFAULT and PROMPT directives.

APPEND options...
Add one or more options to the kernel command line. These are
added both for automatic and manual boots. The options are
added at the very beginning of the kernel command line,
usually permitting explicitly entered kernel options to override
them. This is the equivalent of the LILO "append" option.

IPAPPEND flag_val [PXELINUX only]
The IPAPPEND option is available only on PXELINUX. The
flag_val is an OR of the following options:

1: indicates that an option of the following format
should be generated and added to the kernel command line:


... based on the input from the DHCP/BOOTP or PXE boot server.

it, it is probably an indication that your network configuration
is broken. Using just "ip=dhcp" on the kernel command line
is a preferrable option, or, better yet, run dhcpcd/dhclient,
from an initrd if necessary.

2: indicates that an option of the following format
should be generated and added to the kernel command line:


... in dash-separated hexadecimal with leading hardware type
(same as for the configuration file; see pxelinux.txt.)

This allows an initrd program to determine from which
interface the system booted.

LABEL label
KERNEL image
APPEND options...
IPAPPEND flag_val [PXELINUX only]
Indicates that if "label" is entered as the kernel to boot,
Syslinux should instead boot "image", and the specified APPEND
and IPAPPEND options should be used instead of the ones
specified in the global section of the file (before the first
LABEL command.) The default for "image" is the same as
"label", and if no APPEND is given the default is to use the
global entry (if any).

Starting with version 3.62, the number of LABEL statements is
virtually unlimited.

Note that LILO uses the syntax:
image = mykernel
label = mylabel
append = "myoptions"

... whereas Syslinux uses the syntax:
label mylabel
kernel mykernel
append myoptions

Note: The "kernel" doesn't have to be a Linux kernel; it can
be a boot sector or a COMBOOT file (see below.)

Since version 3.32 label names are no longer mangled into DOS
format (for SYSLINUX.)

The following commands are available after a LABEL statement:

LINUX image - Linux kernel image (default)
BOOT image - Bootstrap program (.bs, .bin)
BSS image - BSS image (.bss)
PXE image - PXE Network Bootstrap Program (.0)
FDIMAGE image - Floppy disk image (.img)
COMBOOT image - COMBOOT program (.com, .cbt)
COM32 image - COM32 program (.c32)
CONFIG image - New configuration file
Using one of these keywords instead of KERNEL forces the
filetype, regardless of the filename.

CONFIG means restart the boot loader using a different
configuration file.

Append nothing. APPEND with a single hyphen as argument in a
LABEL section can be used to override a global APPEND.

On PXELINUX, specifying "LOCALBOOT 0" instead of a "KERNEL"
option means invoking this particular label will cause a local
disk boot instead of booting a kernel.

The argument 0 means perform a normal boot. The argument 4
will perform a local boot with the Universal Network Driver
Interface (UNDI) driver still resident in memory. Finally,
the argument 5 will perform a local boot with the entire PXE
stack, including the UNDI driver, still resident in memory.
All other values are undefined. If you don't know what the
UNDI or PXE stacks are, don't worry -- you don't want them,
just specify 0.

On ISOLINUX, the "type" specifies the local drive number to
boot from; 0x00 is the primary floppy drive and 0x80 is the
primary hard drive. The special value -1 causes ISOLINUX to
report failure to the BIOS, which, on recent BIOSes, should
mean that the next boot device in the boot sequence should be

INITRD initrd_file
Starting with version 3.71, an initrd can be specified in a
separate statement (INITRD) instead of as part of the APPEND
statement; this functionally appends "initrd=initrd_file" to
the kernel command line.

It supports multiple filenames separated by commas.
This is mostly useful for initramfs, which can be composed of
multiple separate cpio or cpio.gz archives.
Note: all files except the last one are zero-padded to a
4K page boundary. This should not affect initramfs.

IMPLICIT flag_val
If flag_val is 0, do not load a kernel image unless it has been
explicitly named in a LABEL statement. The default is 1.

If flag_val is 0, the user is not allowed to specify any
arguments on the kernel command line. The only options
recognized are those specified in an APPEND statement. The
default is 1.

TIMEOUT timeout
Indicates how long to wait at the boot: prompt until booting
automatically, in units of 1/10 s. The timeout is cancelled as
soon as the user types anything on the keyboard, the assumption
being that the user will complete the command line already
begun. A timeout of zero will disable the timeout completely,
this is also the default.

Indicates how long to wait until booting automatically, in
units of 1/10 s. This timeout is *not* cancelled by user
input, and can thus be used to deal with serial port glitches
or "the user walked away" type situations. A timeout of zero
will disable the timeout completely, this is also the default.

Both TIMEOUT and TOTALTIMEOUT can be used together, for

# Wait 5 seconds unless the user types something, but
# always boot after 15 minutes.

ONTIMEOUT kernel options...
Sets the command line invoked on a timeout. Normally this is
the same thing as invoked by "DEFAULT". If this is specified,
then "DEFAULT" is used only if the user presses to

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

xyzzy plugh foo bar baz

SERIAL port [[baudrate] flowcontrol]
Enables a serial port to act as the console. "port" is a
number (0 = /dev/ttyS0 = COM1, etc.) or an I/O port address
(e.g. 0x3F8); if "baudrate" is omitted, the baud rate defaults
to 9600 bps. The serial parameters are hardcoded to be 8
bits, no parity, 1 stop bit.

"flowcontrol" is a combination of the following bits:
0x001 - Assert DTR
0x002 - Assert RTS
0x008 - Enable interrupts
0x010 - Wait for CTS assertion
0x020 - Wait for DSR assertion
0x040 - Wait for RI assertion
0x080 - Wait for DCD assertion
0x100 - Ignore input unless CTS asserted
0x200 - Ignore input unless DSR asserted
0x400 - Ignore input unless RI asserted
0x800 - Ignore input unless DCD asserted

All other bits are reserved.

Typical values are:

0 - No flow control (default)
0x303 - Null modem cable detect
0x013 - RTS/CTS flow control
0x813 - RTS/CTS flow control, modem input
0x023 - DTR/DSR flow control
0x083 - DTR/DCD flow control

For the SERIAL directive to be guaranteed to work properly, it
should be the first directive in the configuration file.

NOTE: "port" values from 0 to 3 means the first four serial
ports detected by the BIOS. They may or may not correspond to
the legacy port values 0x3F8, 0x2F8, 0x3E8, 0x2E8.

Enabling interrupts (setting the 0x008 bit) may give better
responsiveness without setting the NOHALT option, but could
potentially cause problems with buggy BIOSes.


Uccidete pure me, ma l'idea che è in me non l'ucciderete mai

"Non consolarmi della morte", a Ulisse replicava il Pelìde.
"Io pria torrei servir bifolco per mercede, a cui scarso e vil cibo difendesse i giorni,
che del Mondo defunto aver l'impero."
tutto il klan deve rendere conto solo a Dio, mica agli elettori e alla giustizia [taunus 20:10]
    Rispondi Citando Rispondi
Friday, 2 April 2010, 04:17
L'avatar di  Duilio
 Località: Tarnax IV
 Età: 58
 Messaggi: 27,901

NOHALT flag_val
If flag_val is 1, don't halt the processor while idle.
Halting the processor while idle significantly reduces the
power consumption, but can cause poor responsiveness to the
serial console, especially when using scripts to drive the
serial console, as opposed to human interaction.

CONSOLE flag_val
If flag_val is 0, disable output to the normal video console.
If flag_val is 1, enable output to the video console (this is
the default.)

Some BIOSes try to forward this to the serial console and
sometimes make a total mess thereof, so this option lets you
disable the video console on these systems.

FONT filename
Load a font in .psf format before displaying any output
(except the copyright line, which is output as ldlinux.sys
itself is loaded.) Syslinux only loads the font onto the
video card; if the .psf file contains a Unicode table it is
ignored. This only works on EGA and VGA cards; hopefully it
should do nothing on others.

KBDMAP keymap
Install a simple keyboard map. The keyboard remapper used is
*very* simplistic (it simply remaps the keycodes received from
the BIOS, which means that only the key combinations relevant
in the default layout -- usually U.S. English -- can be
mapped) but should at least help people with AZERTY keyboard
layout and the locations of = and , (two special characters
used heavily on the Linux kernel command line.)

The included program from the LILO distribution
can be used to create such keymaps. The file keytab-lilo.txt
contains the documentation for this program.

DISPLAY filename
Displays the indicated file on the screen at boot time (before
the boot: prompt, if displayed). Please see the section below
on DISPLAY files.

NOTE: If the file is missing, this option is simply ignored.

SAY message
Prints the message on the screen.

PROMPT flag_val
If flag_val is 0, display the boot: prompt only if the Shift or Alt
key is pressed, or Caps Lock or Scroll lock is set (this is the
default). If flag_val is 1, always display the boot: prompt.

NOESCAPE flag_val
If flag_val is set to 1, ignore the Shift/Alt/Caps Lock/Scroll
Lock escapes. Use this (together with PROMPT 0) to force the
default boot alternative.

If flag_val is set to 1, the Tab key does not display labels
at the boot: prompt.

F1 filename
F2 filename
F9 filename
F10 filename
F11 filename
F12 filename
Displays the indicated file on the screen when a function key is
pressed at the boot: prompt. This can be used to implement
pre-boot online help (presumably for the kernel command line
options.) Please see the section below on DISPLAY files.

When using the serial console, press to get to
the help screens, e.g. <2> to get to the F2 screen.
For F10-F12, hit , B, C. For
compatibility with earlier versions, F10 can also be entered as

Blank lines are ignored.

Note that the configuration file is not completely decoded. Syntax
different from the one described above may still work correctly in this
version of Syslinux, but may break in a future one.


DISPLAY and function-key help files are text files in either DOS or UNIX
format (with or without ). In addition, the following special codes
are interpreted:

= = ASCII 12
Clear the screen, home the cursor. Note that the screen is
filled with the current display color.

= = ASCII 15
Set the display colors to the specified background and
foreground colors, where and are hex digits,
corresponding to the standard PC display attributes:

0 = black 8 = dark grey
1 = dark blue 9 = bright blue
2 = dark green a = bright green
3 = dark cyan b = bright cyan
4 = dark red c = bright red
5 = dark purple d = bright purple
6 = brown e = yellow
7 = light grey f = white

Picking a bright color (8-f) for the background results in the
corresponding dark color (0-7), with the foreground flashing.

Colors are not visible over the serial console.

filename = = ASCII 24
If a VGA display is present, enter graphics mode and display
the graphic included in the specified file. The file format
is an ad hoc format called LSS16; the included Perl program
"ppmtolss16" can be used to produce these images. This Perl
program also includes the file format specification.

The image is displayed in 640x480 16-color mode. Once in
graphics mode, the display attributes (set by code
sequences) work slightly differently: the background color is
ignored, and the foreground colors are the 16 colors specified
in the image file. For that reason, ppmtolss16 allows you to
specify that certain colors should be assigned to specific
color indicies.

Color indicies 0 and 7, in particular, should be chosen with
care: 0 is the background color, and 7 is the color used for
the text printed by Syslinux itself.

= = ASCII 25
If we are currently in graphics mode, return to text mode.

.. .. = ASCII 16-23
These codes can be used to select which modes to print a
certain part of the message file in. Each of these control
characters select a specific set of modes (text screen,
graphics screen, serial port) for which the output is actually

Character Text Graph Serial
= = ASCII 16 No No No
= = ASCII 17 Yes No No
= = ASCII 18 No Yes No
= = ASCII 19 Yes Yes No
= = ASCII 20 No No Yes
= = ASCII 21 Yes No Yes
= = ASCII 22 No Yes Yes
= = ASCII 23 Yes Yes Yes

For example:

Text modeGraphics modeSerial port

... will actually print out which mode the console is in!

= = ASCII 26
End of file (DOS convention).

= = ASCII 7
Beep the speaker.


The command line prompt supports the following keystrokes:

boot specified command line
erase one character
erase the whole line
display the current Syslinux version
erase one word
force text mode
list matching labels
.. help screens (if configured)
equivalent to F1..F10
interrupt boot in progress
interrupt boot in progress
display network information (PXELINUX only)


This version of Syslinux supports chain loading of other operating
systems (such as MS-DOS and its derivatives, including Windows 95/98),
as well as COMBOOT-style standalone executables (a subset of DOS .COM
files; see separate section below.)

Chain loading requires the boot sector of the foreign operating system
to be stored in a file in the root directory of the filesystem.
Because neither Linux kernels, boot sector images, nor COMBOOT files
have reliable magic numbers, Syslinux will look at the file extension.
The following extensions are recognized (case insensitive):

none or other Linux kernel image
.0 PXE bootstrap program (NBP) [PXELINUX only]
.bin "CD boot sector" [ISOLINUX only]
.bs Boot sector [SYSLINUX only]
.bss Boot sector, DOS superblock will be patched in [SYSLINUX only]
.c32 COM32 image (32-bit COMBOOT)
.cbt COMBOOT image (not runnable from DOS)
.com COMBOOT image (runnable from DOS)
.img Disk image [ISOLINUX only]

For filenames given on the command line, Syslinux will search for the
file by adding extensions in the order listed above if the plain
filename is not found. Filenames in KERNEL statements must be fully

If this is specified with one of the keywords LINUX, BOOT, BSS,
FDIMAGE, COMBOOT, COM32, or CONFIG instead of KERNEL, the filetype is
considered to be the one specified regardless of the filename.


This section applies to SYSLINUX only, not to PXELINUX or ISOLINUX.
See isolinux.txt for an equivalent procedure for ISOLINUX.

This is the recommended procedure for creating a SYSLINUX disk that
can boot either DOS or Linux. This example assumes the drive is A: in
DOS and /dev/fd0 in Linux; for other drives, substitute the
appropriate drive designator.

---- Linux procedure ----

1. Make a DOS bootable disk. This can be done either by specifying
the /s option when formatting the disk in DOS, or by running the
DOS command SYS (this can be done under DOSEMU if DOSEMU has
direct device access to the relevant drive):

format a: /s
sys a:

2. Boot Linux. Copy the DOS boot sector from the disk into a file:

dd if=/dev/fd0 of=dos.bss bs=512 count=1

3. Run SYSLINUX on the disk:

syslinux /dev/fd0

4. Mount the disk and copy the DOS boot sector file to it. The file
*must* have extension .bss:

mount -t msdos /dev/fd0 /mnt
cp dos.bss /mnt

5. Copy the Linux kernel image(s), initrd(s), etc to the disk, and
create/edit syslinux.cfg and help files if desired:

cp vmlinux /mnt
cp initrd.gz /mnt

6. Unmount the disk (if applicable.)

umount /mnt

---- DOS/Windows procedure ----

To make this installation in DOS only, you need the utility
(included with Syslinux) as well as the installer. If
you are on an WinNT-based system (WinNT, Win2k, WinXP or later), use
syslinux.exe instead.

1. Make a DOS bootable disk. This can be done either by specifying
the /s option when formatting the disk in DOS, or by running the
DOS command SYS:

format a: /s
sys a:

2. Copy the DOS boot sector from the disk into a file. The file
*must* have extension .bss:

copybs a: a:dos.bss

3. Run SYSLINUX on the disk:

syslinux a:

4. Copy the Linux kernel image(s), initrd(s), etc to the disk, and
create/edit syslinux.cfg and help files if desired:

copy vmlinux a:
copy initrd.gz a:


Syslinux supports simple standalone programs, using a file format
similar to DOS ".com" files. A 32-bit version, called COM32, is also
provided. A simple API provides access to a limited set of filesystem
and console functions.

See the file comboot.txt for more information on COMBOOT and COM32


Syslinux will attempt to detect booting on a machine with too little
memory, which means the Linux boot sequence cannot complete. If so, a
message is displayed and the boot sequence aborted. Holding down the
Ctrl key while booting disables this feature.

Any file that SYSLINUX uses can be marked hidden, system or readonly
if so is convenient; SYSLINUX ignores all file attributes. The
SYSLINUX installed automatically sets the readonly/hidden/system
attributes on LDLINUX.SYS.


SYSLINUX can be used to create bootdisk images for El
Torito-compatible bootable CD-ROMs. However, it appears that many
BIOSes are very buggy when it comes to booting CD-ROMs. Some users
have reported that the following steps are helpful in making a CD-ROM
that is bootable on the largest possible number of machines:

a) Use the -s (safe, slow and stupid) option to SYSLINUX;
b) Put the boot image as close to the beginning of the
ISO 9660 filesystem as possible.

A CD-ROM is so much faster than a floppy that the -s option shouldn't
matter from a speed perspective.

Of course, you probably want to use ISOLINUX instead. See isolinux.txt.


SYSLINUX can boot from a FAT filesystem partition on a hard disk
(including FAT32). The installation procedure is identical to the
procedure for installing it on a floppy, and should work under either
DOS or Linux. To boot from a partition, SYSLINUX needs to be launched
from a Master Boot Record or another boot loader, just like DOS itself

Under DOS, you can install a standard simple MBR on the primary hard
disk by running the command:


Then use the FDISK command to mark the appropriate partition active.

A simple MBR, roughly on par with the one installed by DOS (but
unencumbered), is included in the SYSLINUX distribution. To install
it under Linux, simply type:

cat mbr.bin > /dev/XXX

... where /dev/XXX is the device you wish to install it on.

Under DOS or Win32, you can install the SYSLINUX MBR with the -m
option to the SYSLINUX installer, and use the -a option to mark the
current partition active:

syslinux -ma c:

Note that this will also install SYSLINUX on the specified partition.


I have started to maintain a web page of hardware with known
problems. There are, unfortunately, lots of broken hardware out
there; especially early PXE stacks (for PXELINUX) have lots of

A list of problems, and workarounds (if known), is maintained at:


The Linux boot protocol supports a "boot loader ID", a single byte
where the upper nybble specifies a boot loader family (3 = Syslinux)
and the lower nybble is version or, in the case of Syslinux, media:

0x31 (49) = SYSLINUX
0x32 (50) = PXELINUX
0x33 (51) = ISOLINUX
0x34 (52) = EXTLINUX

In recent versions of Linux, this ID is available as

++++ BUG REPORTS ++++

I would appreciate hearing of any problems you have with Syslinux. I
would also like to hear from you if you have successfully used Syslinux,
*especially* if you are using it for a distribution.

If you are reporting problems, please include all possible information
about your system and your BIOS; the vast majority of all problems
reported turn out to be BIOS or hardware bugs, and I need as much
information as possible in order to diagnose the problems.

There is a mailing list for discussion among Syslinux users and for
announcements of new and test versions. To join, or to browse the
archive, go to:

Please DO NOT send HTML messages or attachments to the mailing list
(including multipart/alternative or similar.) All such messages will
be bounced.

seguono menu.txt e usbkey.txt

Uccidete pure me, ma l'idea che è in me non l'ucciderete mai

"Non consolarmi della morte", a Ulisse replicava il Pelìde.
"Io pria torrei servir bifolco per mercede, a cui scarso e vil cibo difendesse i giorni,
che del Mondo defunto aver l'impero."
tutto il klan deve rendere conto solo a Dio, mica agli elettori e alla giustizia [taunus 20:10]
    Rispondi Citando Rispondi
Friday, 2 April 2010, 04:18
L'avatar di  Duilio
 Località: Tarnax IV
 Età: 58
 Messaggi: 27,901

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


The advanced menu system, written by Murali Krishnan Ganapathy, is
located in the menu/ subdirectly. It allows the user to create
hierarchial submenus, dynamic options, checkboxes, and just about
anything you want. It requires that the menu is compiled from a
simple C file, see menu/simple.c and menu/complex.c for examples.

The advanced menu system doesn't support serial console at this time.

See menu/README for more information.


The simple menu system is a single module located at
com32/modules/vesamenu.c32 (graphical) or com32/modules/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 your 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 your configuration file:

UI menu.c32

There are a few menu additions to the configuration file, all starting
with the keywords MENU or TEXT; like the rest of the Syslinux config
file language, it is case insensitive:


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


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


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


Insert an empty line in the menu.


(Only valid after a LABEL statement.)
Changes the label displayed for a specific entry. This allows
you to have a label that isn't 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
KERNEL chain.c32
APPEND hd0 2

The ^ symbol in a MENU LABEL statement defines a hotkey.
The hotkey will be highlighted in the menu and will move the
menu cursor immediately to that entry.

Reusing hotkeys is disallowed, subsequent entries will not be
highlighted, and will not work.

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


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


(Only valid after a LABEL statement.)
Makes the entry unselectable. This allows you to make a
section in your menu with different options below it.
for example:

# Entries for network boots

# Soft Cap Linux
LABEL softcap
MENU LABEL Soft Cap ^Linux 9.6.36
KERNEL softcap-9.6.36.bzi
APPEND whatever

# Dos 6.22
MENU LABEL ^Dos 6.22
KERNEL memdisk
APPEND initrd=dos622.imz

# Separator

# Entries for local boots

# Windows 2000
MENU LABEL ^Windows 2000
KERNEL chain.c32
APPEND hd0 1

# Windows XP
KERNEL chain.c32
APPEND hd0 2


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


(Only valid after a LABEL statement.)

Indicates that this entry should be the default for this
particular submenu. See also the DEFAULT directive below.

Help text ...
... which can span multiple lines

(Only valid after a LABEL statement.)

Specifies a help text that should be displayed when a particular
selection is highlighted.


(Only valid after a LABEL statement.)

Sets 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 you are using passwords, you want to make sure you also use
the settings "NOESCAPE 1", "PROMPT 0", and either set
"ALLOWOPTIONS 0" or use a master password (see below.)

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


Sets a master password. This password can be used to boot any
menu entry, and is required for the [Tab] and [Esc] keys to


For vesamenu.c32, sets the background image. The background
can either be a color (see MENU COLOR) or the name of an image
file, which should be 640x480 pixels and either in PNG or JPEG

MENU BEGIN [tagname]

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 tagname

(Only valid after a LABEL statement.)

This label will transfer to the named submenu instead of
booting anything. To transfer to the top-level menu, specify
"menu goto .top".

MENU EXIT [tagname]

(Only valid after a label statement inside MENU BEGIN ...

Exit to the next higher menu, or, if tagname is specified, to
the named menu.


(Only valid after a LABEL statement.)

This label quits the menu system.

will still allow exiting to the CLI; however, a separate MENU
PASSWD can of course be set for this label.


(Only valid inside MENU BEGIN ... MENU END)

Indicates that the menu system should start at the menu being
defined instead of at the top-level menu. See also the
DEFAULT directive below.


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

For backwards compatibility with earlier versions of Syslinux,
this directive 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.


Remember the last entry selected and make that 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.

The MENU SAVE information can be cleared with
"extlinux --reset-adv ".

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 only save certain entires when selected.

INCLUDE filename [tagname]
MENU INCLUDE filename [tagname]

Include the contents of the configuration file filename 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.


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


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


Takes the place of the TABMSG message if option editing is
disabled. Defaults to blank.


Replaces the message "Password required".

MENU COLOR element ansi foreground background shadow

Sets the color of element "element" to the specified color

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 ([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

"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

"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 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 fg_filter bg_filter shadow

Sets *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.


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 for text mode, 28 for VESA graphics mode.)

F1 textfile background
F12 textfile background

Displays 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, a second argument allows a different background
image (see MENU BACKGROUND for supported formats) to be displayed.

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 or default

Normally, the user 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.

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.


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

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

If you specify more than one file, they will all be read, in the order
specified. The dummy filename ~ (tilde) is replaced with the filename
of the main configuration file.

# The file graphics.conf contains common color and layout commands for
# all menus.
LABEL othermenu
MENU LABEL Another Menu
KERNEL vesamenu.c32
APPEND graphics.conf othermenu.conf

# Return to the main menu
LABEL mainmenu
MENU LABEL Return to Main Menu
KERNEL vesamenu.c32
APPEND graphics.conf ~

See also the MENU INCLUDE directive above.

Questa almeno l' ho capita pure io

Uccidete pure me, ma l'idea che è in me non l'ucciderete mai

"Non consolarmi della morte", a Ulisse replicava il Pelìde.
"Io pria torrei servir bifolco per mercede, a cui scarso e vil cibo difendesse i giorni,
che del Mondo defunto aver l'impero."
tutto il klan deve rendere conto solo a Dio, mica agli elettori e alla giustizia [taunus 20:10]
    Rispondi Citando Rispondi
Friday, 2 April 2010, 04:19
L'avatar di  Duilio
 Località: Tarnax IV
 Età: 58
 Messaggi: 27,901

In ultimo il caso particolare della pennetta

The proper mode to boot a USB key drive in is "USB-HDD". That is the
ONLY mode in which the C/H/S geometry encoded on the disk itself
doesn't have to match what the BIOS thinks it is. Since geometry on
USB drives is completely arbitrary, and can vary from BIOS to BIOS,
this is the only mode which will work in general.

Some BIOSes have been reported (in particular, certain versions of the
Award BIOS) that cannot boot USB keys in "USB-HDD" mode. This is a
very serious BIOS bug, but it is unfortunately rather typical of the
kind of quality we're seeing out of major BIOS vendors these days. On
these BIOSes, you're generally stuck booting them in USB-ZIP mode.


A standard zipdrive (both the 100 MB and the 250 MB varieties) have a
"geometry" of 64 heads, 32 sectors, and are partitioned devices with a
single partition 4 (unlike most other media of this type which uses
partition 1.) The 100 MB variety has 96 cylinders, and the 250 MB
variety has 239 cylinders; but any number of cylinders will do as
appropriate for the size device you have. For example, if your device
reports when inserted into a Linux system:

usb-storage: device found at 4
Vendor: 32MB Model: HardDrive Rev: 1.88
Type: Direct-Access ANSI SCSI revision: 02
SCSI device sda: 64000 512-byte hdwr sectors (33 MB)

... you would have 64000/(64*32) = 31.25 cylinders; round down to 31.

The script "mkdiskimage" which is supplied with the syslinux
distribution can be used to initialize USB keys in a Zip-like fashion.
To do that, calculate the correct number of cylinders (31 in the
example above), and, if your USB key is /dev/sda (CHECK THE KERNEL

mkdiskimage -4 /dev/sda 0 64 32

(The 0 means automatically determine the size of the device, and -4
means mimic a zipdisk by using partition 4.)

Then you should be able to run

syslinux /dev/sda4

Uccidete pure me, ma l'idea che è in me non l'ucciderete mai

"Non consolarmi della morte", a Ulisse replicava il Pelìde.
"Io pria torrei servir bifolco per mercede, a cui scarso e vil cibo difendesse i giorni,
che del Mondo defunto aver l'impero."
tutto il klan deve rendere conto solo a Dio, mica agli elettori e alla giustizia [taunus 20:10]
    Rispondi Citando Rispondi
Saturday, 3 April 2010, 16:55
 Utente Appassionato
 Località: In val bisagno bassa bassa
 Età: 57
 Messaggi: 1,068

Sei il solito casinista
Ma ............. non dormi mai?
    Rispondi Citando Rispondi
Saturday, 3 April 2010, 18:34
L'avatar di  Duilio
 Località: Tarnax IV
 Età: 58
 Messaggi: 27,901

Pensa che alle 6 e mezza sono gia' li' ad azzuffarsi per il bagno che e' la porta accanto alla mia....

Comunque ho quasi risolto con syslinux.

L' unico problema, non da poco purtroppo, e' nel passare il device di boot.

Se uso

DEFAULT /mboot.c32 /boot eccetera intird.destica.img
APPEND bootdev=82

avviene la scansione delle partizioni di quel device e l'elenco mi viene listato correttamente.

Se invece introduco un menu e passo kernel e parametri alla riga KERNEL xxxx, la successiva APPEND viene listata a video ma il device indicato viene ignorato e viene analizzata la partitione table del device 80, indipendentemente da quale ho indicato.

A quel punto ESC, indico il device a mano e ottengo il menu partizioni prima e quello di grub dopo.

Liberte' fraternite' alimorte'

Uccidete pure me, ma l'idea che è in me non l'ucciderete mai

"Non consolarmi della morte", a Ulisse replicava il Pelìde.
"Io pria torrei servir bifolco per mercede, a cui scarso e vil cibo difendesse i giorni,
che del Mondo defunto aver l'impero."
tutto il klan deve rendere conto solo a Dio, mica agli elettori e alla giustizia [taunus 20:10]
    Rispondi Citando Rispondi
Sunday, 4 April 2010, 11:13
L'avatar di  Duilio
 Località: Tarnax IV
 Età: 58
 Messaggi: 27,901


ho provato anche a lanciargli dei file di configurazione secondari in cui uso la sintassi con DEFAULT invece che KERNEL ma si incasina portandosi dietro le vecchie definizioni di label.

Non capisco proprio il senso

Se imposto bootdev con l' unico APPEND ad una riga DEFAULT, funziona
Se imposto bootdev a mano indicandolo in fase di boot (uscendo con ESC), funziona
Se imposto bootdev in un APPEND di ina riga KERNEL (all' interno della LABEL di un menu), se lo accodo all' APPEND originale (initrd) viene ignorato, se faccio un secondo append il boot non prosegue
Se da menu lancio un file conf ulteriore ... la cosa si incasina pesta, sia che ci introduca un nuovo menu, sia che provi a lanciare con la sintassi DEFAULT

Purtroppo non so risolvere con grub, in quanto alcuni OS del multiboot non hanno esplicitamente files di kernel e ramfs raggiungibili, occorre passare dal loro bootloader, da qui la necessita' di far spazzolare i loro bootsector e partition table da syslinux.

Se grub sa fare la stessa cosa, con una specie di mboot.c32, sono aperto a suggerimenti.

Come diceva l' indiano, se sei incerto....

Uccidete pure me, ma l'idea che è in me non l'ucciderete mai

"Non consolarmi della morte", a Ulisse replicava il Pelìde.
"Io pria torrei servir bifolco per mercede, a cui scarso e vil cibo difendesse i giorni,
che del Mondo defunto aver l'impero."
tutto il klan deve rendere conto solo a Dio, mica agli elettori e alla giustizia [taunus 20:10]
    Rispondi Citando Rispondi
Rispondi Invia Nuova Discussione

Utenti attualmente attivi che stanno leggendo questa discussione: 1 (0 utenti e 1 visitatori)

Thread già visto da:
C0m4nch3, Andrea72, ggigi99, RomeoKnight, foul64, Duilio, Carson, palin, S71ng, gattonero, AbsyntH, BRAVO 2, SatRider, Foxes, ale82x, Neles, Attilio, davide72, TW
Strumenti Discussione Cerca in questa Discussione
Cerca in questa Discussione:

Ricerca Avanzata
Modalità Visualizzazione

top Regole di scrittura
Tu non puoi inserire messaggi
Tu non puoi rispondere ai messaggi
Tu non puoi inviare allegati
Tu non puoi modificare i tuoi messaggi

codice vB è Attivo
Smilies è Attivo
[IMG] il codice è Attivo
Il codice HTML è Attivo

Se hai problemi, contattaci

Visite Totali Posts: 99.547.328
Tutti gli Orari sono GMT +1. Attualmente sono le 05:27.

iGroup Black
Powered by vBulletin Versione 3.5.6
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
Traduzione italiana a cura di:
2000, 2012 © Visiva Group