Menu old

From Syslinux Wiki
Revision as of 14:26, 28 July 2007 by Bls (talk | contribs)

Jump to: navigation, search

Simple Menu System

For the isolinux bootloader you probably want to have a menu of choices for selecting what to boot. Tpday there are two versions of the simple menu system, the original text mode style and the new GUI style. The text mode style works on anything with a VGA card, which is almost every X86 box ever made. The GUI version works well with cards that have good VESA support.

Text Mode

Here is a typical example of a simple text-mode isolinux.cfg file to configure a simple menu:

default menu.c32
prompt 0
menu title My Distro Installer

timeout 600
f1 help.txt
f2 version.txt

label bls
  menu label Normal install
  menu default
  kernel vmlinuz
  append initrd=cpio.gz rdinit=/init

label bad
  menu label Bad hardware install
  kernel vmlinuz
  append initrd=cpio2.gz badhardware rdinit=/init

global tags

The line with default menu.c32 activates the simple menu sytem. In this example the menu has two choices, bls and bad. As you can see, the global options are at the beginning of the file, and then there are a series of sections that begin with label and end with a blank line. The timeout 600 sets a timer that counts down for 60 seconds. It says 600 since it measures time in tenths of seconds. Once that time expires, the menu entry that is the default is selected automatically. If no menu item has the menu default then the first menu item is selected. The line with menu title My Distro Installer will display My Distro Installer at the top of the generated text menu. The line f1 help.txt will cause the contents of the file help.txt to be displayed. The line f2 version.txt will cause the contents of the file version.txt to be displayed. The lines for f1 and f2 are optional. The line prompt 0 suppress the normal boot: prompt.

per-menu tags

Each menu entry starts with label name where name is the name to type in to the boot: prompt (which is still available if the users presses shift). The text to display on the menu is specified by the menu label tag. The name of the kernel image to boot is specified by the kernel tag. Remember, that name must be a valid DOS name fitting in the 8.3 limits and also the extensions can have special meanings. It is best to just use a short name with no extension and then you never have trouble. The final tag used in this example is the append tag. The text specified after that tag will be added to the kernel image command line when booting the kernel. Normally you would at least specify your initramfs name with initrd=archive and your initramfs boot script location with rdinit=/somescript.