[syslinux] vesamenu.c32 + include + CLI woes

H. Peter Anvin hpa at zytor.com
Thu Feb 14 18:00:02 PST 2008


Bryan Perry wrote:
> Hi all,
> 
> In June 2007 Jerry Nelson started a thread on this mailing list about a problem he was seeing. The thread was http://syslinux.zytor.com/archives/2007-June/008673.html
> 
> After several hours of searching through the list, I am still convinced that his problem was never solved and is very valid. I recently moved from the old syslinux config options model (all labels in 1 default config file) to having a main menu and submenus using vesamenu.c32. The main menu points to all of the submenus and also has a label for localboot. Each submenu has tons of labels that fit the category of the submenu.
> 
> The problem is that not every user wants to navigate the menu structure to find the label they want to boot, but they would rather hit escape to get the boot: prompt and type in the memorized label like they used to in the old syslinux model. However, hitting escape and getting the boot: prompt only recognizes the label in the default config file and not in any of the submenu config files. I too have tried MANY attempts at using CONFIG and INCLUDE directives, but have been unsuccessful. Using just the INCLUDE option still dumps all of the labels from the included file into my main menu and really makes a mess of things.
> 
> I would even be fine adding all the labels from all of the submenu config files into the main menu config if there was any way for them not to show up in the menu.
> 
> Please help, my forehead hurts from pounding it on the keyboard.....
> 

It is ugly, but there is a way to do it (I have plans for a much cleaner 
implementation, but I'm being way too busy unfortunately.)

This is how: have your main configuration file contain:

-------------
# This is where we start the menu tree...
default vesamenu.c32 main.cfg

include main.cfg
include submenu1.cfg
include submenu2.cfg
include submenu3.cfg
--------------

The trick is that the root of the menu tree doesn't actually have to be 
your main configuration file (the one that's read by the CLI.)  Thus, 
you can have the main configuration file include ALL your submenus, and 
therefore seeing all the labels (at least up to the 64K limit in the CLI.)

	-hpa




More information about the Syslinux mailing list