Hi, I have a small issue with the SAY command and i hope you can clarify it out for me. 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? In the attached file, if i boot the LABEL "debian" i still get the messages from the two other blocks, and obviously i don't want that. Did I misunderstand what the SAY command should do? Thanks for your attention. -- free as in freedom, not free beer -------------- next part -------------- #DEFAULT debian.4.17 DEFAULT debian LABEL debian KERNEL /vmlinuz APPEND root=UUID=e3ef26d2-2867-48fe-9369-d0a32c5e1d31 ro quiet -- systemd.show_status=true INITRD /initrd.img LABEL debian.old SAY *** You are booting on old kernel, edit DEFAULT in your extlinux.conf when done *** KERNEL /vmlinuz.old APPEND root=UUID=e3ef26d2-2867-48fe-9369-d0a32c5e1d31 ro quiet -- systemd.show_status=true INITRD /initrd.img.old LABEL debian.4.17 SAY *** You are booting on kernel 4.17, edit DEFAULT in your extlinux.conf when done *** KERNEL /vmlinuz-4.17.0-3-amd64 APPEND root=UUID=e3ef26d2-2867-48fe-9369-d0a32c5e1d31 ro quiet -- systemd.show_status=true INITRD /initrd.img-4.17.0-3-amd64
> > 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.
On Thu, Nov 01, 2018 at 04:51:46PM +0000, Ady Ady via Syslinux wrote:> > ... > > 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.Oh thanks, this is what i was suspecting... that was the missing piece indeed.> ... > There are several ways to circumvent this limitation, but any of those > could be thought of "over-complicated" for your very simple goal. > ...Thank you for your fast and in-depth reply, and for the practical example. I think i will dig deeper into the modules part of the wiki, which i skipped when i first configured the bootloader some time ago... Also, i much appreciated the offtopic tips ;) Thanks again and all the best! -- free as in freedom, not free beer