[syslinux] syslinux.cfg, default, labels

Gene Cumm gene.cumm at gmail.com
Thu Sep 28 09:40:17 PDT 2017


On Thu, Sep 28, 2017 at 4:51 AM, Ferenc Wágner via Syslinux
<syslinux at zytor.com> wrote:
> gxhniip421zw--- via Syslinux <syslinux at zytor.com> writes:
>
>> I have tried
>>
>>  default vmlinuz-4.12.13_1 root=.... rootflags=.... initrd=....
>>
>> but vmlinuz does not get executed.
>> I was given a prompt ("boot:"). Despite that "prompt 0" and "timeout
>> 0" are present in the cfg.
>
> To exclude the possibility of some unfortunate filename mangling, try
> with a kernel with a DOS-compatible 8.3 name (for example: vmlinuz).
>
>> With using a label and, after the label, "linux" + the above command
>> line, vmlinux does get executed fine.
>>
>> So, *is the use of labels mandatory?*...
>
> Depending on file name, it may be.  Lacking explicit specification (like
> LINUX in your case), file types are determined by extension, which may
> give wrong results.  See doc/syslinux.txt for details.

In my opinion, it's at least highly suggested and probably
recommended.  It's comparable to the KERNEL versus kernel-like
directives like LINUX and COM32.

>> What is the absolute shortest syslinux.cfg when I want to just start
>> immediately the vmlinuz? No menu, no prompt, no implicit command line,
>> no keystroke watching, no autocompleting.
>
> I use this one:
>
> DEFAULT lua.c32 bootmenu.lua

Although I'd typically suggest using a LABEL and a label APPEND, your
scenario is perhaps done shorter with linux.c32 to ensure it's loaded
like a Linux kernel.  This will take mildly longer as linux.c32 and
its dependencies must be loaded first.

If you want the minimal loading of ancillary files while ensuring it's
used like a Linux kernel:


DEFAULT linux
LABEL linux
LINUX vmlinuz-4.12.13_1
APPEND root=.... rootflags=.... initrd=....


You might be able to get away with concatenating the APPENDed
parameters to the LINUX line.  Remember, "TIMEOUT 0" is about 13 years
and "PROMPT 0" is the default.

>> The 'ontimeout' is the same as 'default', or is there any difference?
>> Only one of them can be present?
>
> DEFAULT interacts with the menu system if both are present.

Both DEFAULT and ONTIMEOUT serve different purposes.  ONTIMEOUT is
used when the timeout timer expires.  If not present, DEFAULT is used.
DEFAULT is used with the command line and menu.c32 if the user hits
say enter to execute the DEFAULT.

-- 
-Gene



More information about the Syslinux mailing list