[syslinux] What extlinux -M does?

Jeffrey Hutzelman jhutz at cmu.edu
Sat Nov 26 18:13:04 PST 2011

On Sat, 2011-11-26 at 16:31 -0800, Regid Ichira wrote:
> 1. Which label is referred by
>     -M, --menu-save=label
>               Set the label to select as default on the next boot

This is perhaps a bit confusing.  Even though this option affects the
behavior of the menu system, the labels referred to are those defined by
the 'label' command, which are the unique identifiers for each option.
The 'menu label' command is used to control the label shown on the
screen for each menu item.

> 2.1 What will be the consequences of
>     # extlinux -M 1 /boot/extlinux
> and
>     # extlinux -M 'An old linux version' /boot/extlinux

Well, you haven't quoted your entire config file, but what you have
quoted suggests that this isn't very interesting, since you only have
one label to boot to begin with.  But...

Your first example will set the default to "1", which will cause the
entry with that label to be set as the default entry.  This means that
when the menu is first shown, that item will be highlighted.  Since that
entry is the only one in your config file, this has no visible effect.

Your second example sets the default to "An old linux version".  Since
there is no entry with that label, this has no effect.

> 2.2 What are the differences between
>     # extlinux -M 'An old linux version' /boot/extlinux

As noted above, this has no effect.  On the other hand, using -M 1 would
have set the label '1' to be the default menu selection, causing it to
be highlighted when the menu starts, and potentially used if the menu
times out without the user selecting anything (this depends on other
configuration such as how you have set the TIMEOUT and ONTIMEOUT

Essentially, -M behaves similarly to (but overrides) the DEFAULT
directive, but only with respect to the menu system (it does not affect
the command line) and only if 'MENU SAVE' is in effect.

> and
>     # extlinux -o 1 /boot/extlinux

This instructs syslinux to behave, on the next boot only, as if you had
typed '1'.  This will cause your '1' label to be booted automatically
and without delay, but only once.  After that, the normal behavior

-- Jeffrey T. Hutzelman (N3NHS) <jhutz+ at cmu.edu>
   Sr. Research Systems Programmer
   School of Computer Science - Research Computing Facility
   Carnegie Mellon University - Pittsburgh, PA

More information about the Syslinux mailing list