[syslinux] SAY command (mis)behaviour?
Ady Ady
ady-sf at hotmail.com
Thu Nov 1 09:51:46 PDT 2018
>
> I boot my system with the attached extlinux.conf, which has some
> entries to boot old kernels. When i'm booting the old versions i'd
> like to have a reminder message recalling me that the most recent
> kernel is not being used, so that i don't forget to switch back to it,
> for example after many days of uptime.
>
> Now, is it normal that _every_ SAY command is executed no matter which
> LABEL block is being booted?
Indeed, "SAY" is a "global" directive, not a "per-label" directive.
This is also how it is listed in the "table of contents" of the
"Config(uration)" wiki page, under "GLOBAL DIRECTIVES - SECONDARY".
See:
https://www.syslinux.org/wiki/index.php/Config#toc
(please note that there is additional general info before the TOC (up)
in that page).
There are several ways to circumvent this limitation, but any of those
could be thought of "over-complicated" for your very simple goal.
Another possibility would be to use the "boot-once" options of the
'extlinux' command / installer (please search/read the wiki).
You could alternatively / also add a general help text (in a plain text
file) and then make use of the DISPLAY directive, or even F1...F12 with
multiple help files (see the wiki).
One relatively simple way you could have "per-label" help text (or your
remainder text) would be to use (vesa)menu.c32 and then you can take
advantage of the so-called "menu directives", in particular "TEXT
HELP":
https://www.syslinux.org/wiki/index.php?title=Menu#TEXT_HELP
For example:
### Start extlinux.conf (or even better, syslinux.cfg) ###
# Add 1 line:
UI menu.c32
# Another new line, optional
TIMEOUT 50
DEFAULT debian
# I AM SKIPPING OTHER ENTRIES, JUST SHOWING EXAMPLE
LABEL debian.old
# Note the off-topic suggestion to use "LINUX"
# instead of "KERNEL" for "modern" Linux kernels
LINUX /vmlinuz.old
APPEND # WHATEVER YOU ALREADY HAVE HERE
INITRD /initrd.img.old
# Note the added TEXT HELP ... ENDTEXT directives
# and (your) text in between:
TEXT HELP
*** You are booting on old kernel, ***
*** edit DEFAULT in your extlinux.conf when done ***
ENDTEXT
# I AM SKIPPING OTHER ENTRIES, JUST SHOWING EXAMPLE
### End extlinux.conf (or even better, syslinux.cfg) ###
HTH,
Ady.
More information about the Syslinux
mailing list