11

I'm tweaking a Debian live system (built with live-build), and I want it to boot straight into the system from syslinux — no menu, no timeout. According to the syslinux documentation, a timeout value of 0 means that the timeout is disabled, ie. it won't boot at all without user intervention, which is the opposite of what I want.

It might be nice to be able to hold down a key for those rare occasions where I do need to tweak the kernel line, but that's not essential. Really I just want an immediate boot. How do I get it?

The current syslinux configuration is this:

syslinux.cfg:

include menu.cfg
default vesamenu.c32
prompt 0
timeout 0

menu.cfg:

menu hshift 0
menu width 82

menu title Boot menu
include stdmenu.cfg
include live.cfg
include install.cfg
menu end

stdmenu.cfg:

menu background splash.png
menu color title    * #FFFFFFFF *
menu color border   * #00000000 #00000000 none
menu color sel      * #ffffffff #76a1d0ff *
menu color hotsel   1;7;37;40 #ffffffff #76a1d0ff *
menu color tabmsg   * #ffffffff #00000000 *
menu color help     37;40 #ffdddd00 #00000000 none
menu vshift 17
menu rows 10
menu helpmsgrow 15
# The command line must be at least one line from the bottom.
menu cmdlinerow 16
menu timeoutrow 16
menu tabmsgrow 18
menu tabmsg Press ENTER to boot or TAB to edit a menu entry

live.cfg:

label live-
    menu label ^Live ()
    menu default
    kernel /live/vmlinuz
    append initrd=/live/initrd.img boot=live config quiet ipv6.disable=1 console=tty0 console=ttyS0,115200n8

install.cfg: empty

detly
  • 5,020
  • 6
  • 23
  • 29

3 Answers3

6

Remove the line default vesamenu.c32 (or comment it out) and replace it with default live-.

From the SYSLINUX docs (emphasis mine):

Selects a specific user interface module (typically menu.c32 or vesamenu.c32). The command-line interface treats this as a directive that overrides the DEFAULT and PROMPT directives.

detly
  • 5,020
  • 6
  • 23
  • 29
  • So is that "live-" (live minus) ? – MikeW Mar 20 '18 at 09:16
  • Certainly without the "-" the boot does not complete fully. Where is this "live-" feature documented ? – MikeW Mar 20 '18 at 09:22
  • The `live-` is simply the name of one of the boot configurations (see the `live.cfg` file contents in my question text). I don't know what the reason for that extra hyphen is, and I presume if you rename that config you can call it whatever you want. Unless the `live-boot` process relies on it being called exactly that in the syslinux menu, which would surprise me. – detly Mar 20 '18 at 09:48
  • Thanks, @detly - I did wonder whether it was a .cfg name, but cannot see a live.cfg in the Ubuntu iso isolinux directory. Certainly, left as-is with the vesamenu, it boots to the "Try / Install" menu, with just "live" it sits there with moving dots, as if it cannot find a file to run. Will investigate further: thanks. Maybe the whole process is documented somewhere !! – MikeW Mar 21 '18 at 08:40
  • I will use your examples to make my own immediate-boot file, @detly . – MikeW Mar 21 '18 at 08:55
  • It's mentioned in text.cfg ... – MikeW Mar 22 '18 at 09:20
2

You can first try to set NOESCAPE to 1.

If [...] is set to 1, ignore the Shift/Alt/Caps Lock/Scroll Lock escapes. Use this (together with PROMPT 0) to force the default boot selection.

If it's not enough, maybe you will have to bear a timeout set to 1. It's

in units of 1/10 s

So it should boot after 100ms.

Coren
  • 4,970
  • 1
  • 24
  • 43
0

Just set:

prompt 1
timeout 1

and system will boot directly to live mode.

Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164
redi
  • 1