Menu old

From Syslinux Wiki
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. Today 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:

( Note that since version 3.74, the default directive usage has changed. Use UI instead) ( See UI mode or Changes in 3.74 )

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.

GUI mode

It is possible to show very nice looking graphics on most computers with the simple menu system. For technical people the graphics are not important, but for many end-users having a nice GUI display makes them feel your distribution is more professional.

GUI example coming soon.... </p>


Example of a PXELINUX using GUI-Submenusystem based on vesamenu.c32 taken from the actual Development version of the MosNis (filename of this example: VOS102.conf):

( Note that since version 3.74, the default directive usage has changed. Use UI instead) ( See UI mode or Changes in 3.74 )

DEFAULT vesamenu.c32
PROMPT 0
MENU TITLE openSUSE 10.2
MENU BACKGROUND os102.png

# 64 Bit NFS
LABEL openSUSE 10.2 64 Bit NFS
  MENU LABEL openSUSE 10.2 64 Bit NFS
  KERNEL vesamenu.c32
  APPEND VOS10264NFS.conf

# 64 Bit FTP
LABEL openSUSE 10.2 64 Bit FTP
  MENU LABEL openSUSE 10.2 64 Bit FTP
  KERNEL vesamenu.c32
  APPEND VOS10264FTP.conf

# 64 Bit HTTP
LABEL openSUSE 10.2 64 Bit HTTP
  MENU LABEL openSUSE 10.2 64 Bit HTTP
  KERNEL vesamenu.c32
  APPEND VOS10264HTTP.conf

# 64 Bit SMB
LABEL openSUSE 10.2 64 Bit SMB
  MENU LABEL openSUSE 10.2 64 Bit SMB
  KERNEL vesamenu.c32
  APPEND VOS10264SMB.conf

# 32 Bit NFS
LABEL openSUSE 10.2 32 Bit NFS
  MENU LABEL openSUSE 10.2 32 Bit NFS
  KERNEL vesamenu.c32
  APPEND VOS10232NFS.conf

# 32 Bit FTP
LABEL openSUSE 10.2 32 Bit FTP
  MENU LABEL openSUSE 10.2 32 Bit FTP
  KERNEL vesamenu.c32
  APPEND VOS10232FTP.conf

# 32 Bit HTTP
LABEL openSUSE 10.2 32 Bit HTTP
  MENU LABEL openSUSE 10.2 32 Bit HTTP
  KERNEL vesamenu.c32
  APPEND VOS10232HTTP.conf

# 32 Bit SMB
LABEL openSUSE 10.2 32 Bit SMB
  MENU LABEL openSUSE 10.2 32 Bit SMB
  KERNEL vesamenu.c32
  APPEND VOS10232SMB.conf

# Hauptauswahl
LABEL mainback
 MENU LABEL Zur Hauptauswahl
 KERNEL vesamenu.c32
 APPEND VMAIN.conf

#Deutsche Tastaturbelegung
KBDMAP german.kbd

#Menüeinstellungen
MENU WIDTH 80
MENU MARGIN 10
MENU ROWS 12
MENU TABMSGROW 18
MENU CMDLINEROW 12
MENU ENDROW 24
MENU TIMEOUTROW 20
ONTIMEOUT localboot
TIMEOUT 200

#Hilfstexte
F1 S-Hilfe.txt
F2 S-SMB.txt
F3 S-FTP.txt
F4 S-HTTP.txt
F5 S-SMB.txt
F6 Hauptauswahl.txt