IMPORTANT: No confongueu encendre una màquina des de la targeta de xarxa (conegut com Wake On LAN) amb l' arrancada d'un sistema operatiu des de xarxa.
Aquest article tracta sobre com arrancar un sistema operatiu des de la xarxa.
PXE vol dir Preboot eXecution Environment, també conegut com a Pre-Execution Environment o pixie.
PXE és un entorn per arrancar màquines a través de la xarxa. Es pot per exemple utilitzar per arrancar un sistema operatiu en una màquina sense disc dur.
PXE va formar part del projecte Wired for Management d'Intel (any 1990)..
Utilitza els següents protocols:
I conceptes com:
Recursos:
PXELINUX és un sistema derivat de SYSLINUX (syslinux). És utilitzar per PXE per fer el mateix que faria un syslinux però en xarxa (permet mostrar un menú d'arrancada del sistema, similar al que fa grub en un disc local).
DRBL utilitza PXE Linux.
Recursos:
El protocol PXE és una combinació dels protocols DHCP i TFTP. El protocol DHCP s'utilitza per localitzar el servidor que permetrà arrancar la màquina i TFTP s'utilitza per descarregar el programa que arrancarà el client (bootstrap program) i altres fitxers addicionals.
El client PXE utilitzant el firmware de la targeta de xarxa, envia una petició DHCPDISCOVER a tota la xarxa (broadcast). Aquesta petició conté opcions específiques de PXE.
Podeu veure els paquets que envia el client amb:
$ sudo tcpdump udp tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes 17:59:31.625863 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 08:00:27:40:3e:fb (oui Unknown), length 548 17:59:31.625877 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 08:00:27:40:3e:fb (oui Unknown), length 548 17:59:31.632166 IP 192.168.1.5.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 300 17:59:31.632182 IP 192.168.1.5.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 300
Com que els paquets són enviats en broadcast, podeu executar tcpdump des de qualsevol màquina de la xarxa (no cal que sigui ni el client PXE ni el servidor PXE).
El paquet:
IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 08:00:27:40:3e:fb (oui Unknown), length 548
És la petició DHCP_DISCOVER d'un client amb MAC 08:00:27:40:3e:fb. Aquesta petició es genera durant el boot de xarxa:
i el paquet:
192.168.1.5.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 300
és la resposta del servidor de DHCP. I on bootps i bootpc són els ports de DHCP:
$ cat /etc/services | grep boot bootps 67/tcp # BOOTP server bootps 67/udp bootpc 68/tcp # BOOTP client bootpc 68/udp
Si no disposeu d'una màquina per fer de client PXE, podeu utilitzar VirtualBox. Amb la opció F12, podeu iniciar de xarxa.
La configuració del servidor de DHCP ha d'incloure els següents paràmetres per poder utilitzar PXE:
Consulteu DHCP per obtenir més informació sobre el protocol DHCP.
Un cop el client ha trobat quin és el servidor de boot a traves del DHCP, s'inicia la descarrega dels fitxers necessaris a la RAM del client utilitzant TFTP. Es poden observar els fitxers durant la càrrega des de xarxa del client (captura de pantalla obtinguda amb la pausa - tecla Ctrl dret+p - de VirtualBox):
El trànsit es pot observar amb tcpdump:
$ sudo tcpdump udp 17:59:31.660150 IP 192.168.1.6.2071 > 192.168.1.5.tftp: 32 RRQ "pxelinux.0" octet blksize 1456 17:59:31.666219 IP 192.168.1.5.38218 > 192.168.1.6.2071: UDP, length 15 17:59:31.668261 IP 192.168.1.6.2071 > 192.168.1.5.38218: UDP, length 4 17:59:31.669055 IP 192.168.1.5.38218 > 192.168.1.6.2071: UDP, length 1460 17:59:31.670532 IP 192.168.1.6.2071 > 192.168.1.5.38218: UDP, length 4 17:59:31.671320 IP 192.168.1.5.38218 > 192.168.1.6.2071: UDP, length 1460 17:59:31.676926 IP 192.168.1.6.2071 > 192.168.1.5.38218: UDP, length 4 17:59:31.677634 IP 192.168.1.5.38218 > 192.168.1.6.2071: UDP, length 1460
El protocol tftp utilitza el port 69:
$ cat /etc/services | grep tftp tftp 69/udp
El primer pas és instal·ar el paquet syslinux per tal de disposar del fitxer pxelinux.0:
$ sudo apt-get install syslinux
Entre els fitxers instal·ats trobem el fitxer pxelinux.0:
$ dpkg -L syslinux | grep pxe $ dpkg -L syslinux | grep pxe /usr/lib/syslinux/pxelinux.0 /usr/share/doc/syslinux/pxelinux.txt.gz
Instal·lem els serveis necessaris per a l'arrancada de xarxa:
$ sudo apt-get install dhcp3-server tftpd-hpa
Cal que conegueu la vostra configuració IP de la xarxa. Per exemple si teniu una xarxa classe C 192.168.0.0/255.255.255.0, segurament cal que poseu quelcom similar a:
ddns-update-style none; option domain-name-servers 80.58.61.250, 80.58.61.254; #Si tenim un servidor de DNS propi a la xarxa la configuració sería: #option domain-name-servers ip_servidor_dns 80.58.61.250, 80.58.61.254; #option domain-name "casa" default-lease-time 86400; max-lease-time 604800; authoritative; subnet 192.168.0.0 netmask 255.255.255.0 { range 192.168.0.100 192.168.0.199; option subnet-mask 255.255.255.0; option broadcast-address 192.168.0.255; option routers 192.168.0.1; filename "pxelinux.0"; }
Al fitxer de configuració de DHCP: /etc/dhcp3/dhcpd.conf.
La línia específica de pxe és:
filename "pxelinux.0";
Si la màquina on hi ha el servidor de FTP amb la imatge de PXE no és la mateixa màquina que el servidor de DHCP aleshores cal afegir la línia:
next-server IP_SERVIDOR_FTP;
Si penseu utilitzar DRBL, cal afegir la línia:
server-name drbl;
Un cop modificada la configuració, cal tornar a iniciar el servidor amb:
$ sudo /etc/init.d/dhcp3-server restart
Consulteu l'article DHCP per tal de tenir més informació sobre aquest protocol i la configuració del servidor.
Per tal de configurar tftpd cal que modifiqueu el fitxer /etc/default/tftpd-hpa:
$ sudo joe /etc/default/tftpd-hpa #Defaults for tftpd-hpa RUN_DAEMON="yes" OPTIONS="-l -s /var/lib/tftpboot"
Canvieu RUN_DAEMON a YES! I inicieu el servei amb:
$ sudo /etc/init.d/tftpd-hpa start Starting HPA's tftpd: in.tftpd.
Podeu comprovar que funciona amb nmap:
$ sudo apt-get install nmap $ sudo nmap -sU localhost -p 69 Starting Nmap 4.76 ( http://nmap.org ) at 2009-05-17 10:16 CEST Interesting ports on localhost (127.0.0.1): PORT STATE SERVICE 69/udp open|filtered tftp
Comproveu que el port de TFTP està obert. Atenció és un port UDP i no és el port típic de FTP (21) sinó el port 69!
L'arrel del servidor FTP es troba a la carpeta /var/lib/tftpboot. Aquí és on s'ha de col·locar els fitxers necessaris per arrancar des de la xarxa.
$ cd /var/lib/tftpboot $ sudo cp /usr/lib/syslinux/pxelinux.0 .
Ara cal crear la carpeta pxelinux.cfg, que conté la configuració de pxe:
$ sudo mkdir pxelinux.cfg $ cd pxelinux.cfg
El fitxer per defecte de configuració és diu default:
$ sudo joe default
Un exemple de fitxer default:
default vesamenu.c32 timeout 70 prompt 0 noescape 1 MENU MARGIN 5 #MENU BACKGROUND drbl.png # Set the color for unselected menu item and timout message MENU COLOR UNSEL 7;32;41 #c0fed700 #00000000 MENU COLOR TIMEOUT_MSG 7;32;41 #c0fed700 #00000000 MENU COLOR TIMEOUT 7;32;41 #c0fed700 #00000000 MENU COLOR HELP 7;32;41 #ffffffff #00000000 # MENU MASTER PASSWD $4$tN3sohIC$9KvgSRFoegBYj6Q8dRQ/KuyhMsY$ MENU AUTOBOOT Arrancada automatica en # segon{,s}... MENU TABMSG Premeu [Tab] per editar les opcions MENU PASSPROMPT "Paraula de pas necessaria" say ********************************************** say TEXT DE PROVA!! say **********************************************
# Allow client to edit boot parameters ALLOWOPTIONS 1 # simple menu title MENU TITLE TITOL DE PROVA label primeraentradamenu MENU DEFAULT #MENU HIDE MENU LABEL Menu de prova # MENU PASSWD kernel vmlinuz-pxe append initrd=initrd-pxe.img devfs=nomount drblthincli=off selinux=0 clientdir=node_root TEXT HELP * TEXT D'AJUDA DE PROVA ENDTEXT
Fixeu-vos que utilitzem el menú gràfic vesamenu.c32. Cal posar aquest fitxers a l'arrel del servidor TFTP: sudo cp -r /media/cdrom/install/netboot/* /var/lib/tftpboot/
$ cd /var/lib/tftpboot/ $ sudo cp /usr/lib/syslinux/*c32 .
Consulteu l'apartat menus per saber més sobre com configurar aquests menús.
El menú serà com el següent:
Podeu afegir una imatge de fons amb la opció #MENU BACKGROUND.
De les opcions del menú cal destacar:
kernel vmlinuz-pxe append initrd=initrd-pxe.img devfs=nomount drblthincli=off selinux=0 clientdir=node_root
On:
Recursos:
Des de CD
NOTA: NO hi és la carpeta a Jaunty Jackalope?
Si teniu preparat tot l'entorn per arrancar des de xarxa, podeu obtenir els fitxers per arrancar des de xarxa des de un CD d'Ubuntu:
$ sudo cp -r /media/cdrom/install/netboot/* /var/lib/tftpboot/
Des de ISO
NOTA: NO hi és la carpeta a Jaunty Jackalope?
Si no teniu CD i només teniu una ISO, pode executar:
$ sudo mkdir /mnt/cdubuntu $ sudo mount -o loop /home/sergi/Desktop/ubuntu-8.04-desktop-i386.iso /mnt/cdubuntu
i aleshores:
$ sudo cp -r /mnt/cdubuntu/install/netboot/* /var/lib/tftpboot/
Des de Internet:
Els podeu trobar a:
http://cdimage.ubuntu.com/netboot/
Per exemple la versió i386 de Jaunty:
$ cd $ mkdir netboot $ cd netboot/ $ wget -N http://archive.ubuntu.com/ubuntu/dists/jaunty/main/installer-i386/current/images/netboot/netboot.tar.gz
Ho descomprimiu amb:
$ sudo tar xvzf netboot.tar.gz
I substituim l'arrel del servidor TFTP:
$ sudo cp -r /var/lib/tftpboot /var/lib/tftpboot.backup $ sudo rm -rf /var/lib/tftpboot $ sudo cp -r netboot /var/lib/tftpboot
Si arranqueu de xarxa des de un client, ara us ha de sortir:
Cal indicar el fitxer de kernel que volem executar i el fitxer initrd. Es poden crear a mida per al nostre kernel amb mkpxeinitrd-net. Consulteu:
DRBL_i_clonezilla#mkpxeinitrd-net
Consulteu DRBL_i_clonezilla#mkpxeinitrd-net_i_mknbi
Instal·lem els serveis necessaris per a l'arrancada de xarxa:
$ sudo apt-get install dhcp3-server tftpd-hpa
Cal que conegueu la vostra configuració IP de la xarxa. Per exemple si teniu una xarxa classe C 192.168.0.0/255.255.255.0, segurament cal que poseu quelcom similar a:
ddns-update-style none; option domain-name-servers 80.58.61.250, 80.58.61.254; #Si tenim un servidor de DNS propi a la xarxa la configuració sería: #option domain-name-servers ip_servidor_dns 80.58.61.250, 80.58.61.254; #option domain-name "casa" default-lease-time 86400; max-lease-time 604800; authoritative; subnet 192.168.0.0 netmask 255.255.255.0 { range 192.168.0.100 192.168.0.199; option subnet-mask 255.255.255.0; option broadcast-address 192.168.0.255; option routers 192.168.0.1; filename "pxelinux.0"; }
Al fitxer de configuració de DHCP: /etc/dhcp3/dhcpd.conf.
La línia específica de pxe és:
filename "pxelinux.0";
Si la màquina on hi ha el servidor de FTP amb la imatge de PXE no és la mateixa màquina que el servidor de DHCP aleshores cal afegir la línia:
next-server IP_SERVIDOR_FTP;
Si penseu utilitzar DRBL, cal afegir la línia:
server-name drbl;
Un cop modificada la configuració, cal tornar a iniciar el servidor amb:
$ sudo /etc/init.d/dhcp3-server restart
Consulteu l'article DHCP per tal de tenir més informació sobre aquest protocol i la configuració del servidor.
També consulteu l'ajuda de PXE per tal de tenir més informació i exemples:
$ sudo gunzip /usr/share/doc/syslinux/pxelinux.txt.gz $ sudo joe /usr/share/doc/syslinux/pxelinux.txt
Consulteu l'apartat:
++++ SETTING UP THE DHCP SERVER ++++
Un cop instal·lat syslinux teniu un fitxer:
/usr/share/doc/syslinux/pxelinux.txt.gz
On hi ha la documentació de pxelinux. Per descomprimir-lo:
$ sudo gunzip /usr/share/doc/syslinux/pxelinux.txt.gz
Ara ja podeu llegir la documentació amb.
$ joe /usr/share/doc/syslinux/pxelinux.txt
Consulteu també la wiki de pxelinux:
http://syslinux.zytor.com/wiki/index.php/PXELINUX
$ file pxelinux.0 pxelinux.0: pxelinux Loader, code offset 0x9c
Ocupa 16K:
$ ls -lh pxelinux.0 -rw-r--r-- 1 root root 16K 2009-01-29 10:25 pxelinux.0
Vegeu també SistemaDeRecuperacióImatgesPerXarxa#PXELinux
Un exemple de fitxer:
$ cat /tftpboot/nbi_img/pxelinux.cfg/default | more # Created by generate-pxe-menu! Do NOT edit unless you know what you are doing! # Keep those comment "MENU DEFAULT" and "MENU HIDE"! Do NOT remove them. # Note!!! If "serial" directive exists, it must be the first directive default vesamenu.c32 timeout 70 prompt 0 noescape 1 MENU MARGIN 5 MENU BACKGROUND drblwp.png # Set the color for unselected menu item and timout message MENU COLOR UNSEL 7;32;41 #c0000090 #00000000 MENU COLOR TIMEOUT_MSG 7;32;41 #c0000090 #00000000 MENU COLOR TIMEOUT 7;32;41 #c0000090 #00000000 MENU COLOR HELP 7;32;41 #c0000090 #00000000 # MENU MASTER PASSWD say ********************************************** say Welcome to DRBL. say NCHC Free Software Labs, Taiwan. say http://drbl.nchc.org.tw; http://drbl.sf.net say ********************************************** # Allow client to edit boot parameters ALLOWOPTIONS 1 ...
La documentació de com modificar el menú la trobem a:
/usr/share/doc/syslinux
La documentació està comprimida. Podeu descomprimir amb:
$ cd /usr/share/doc/syslinux $ sudo gunzip *.gz
El fitxer que explica com configurar el menú és el fitxer README.menu:
$ cat /usr/share/doc/syslinux/README.menu
Per exemple a DRBL, si observeu la carpeta /tftpboot/nbi_img:
$ cd /tftpboot/nbi_img $ ls *c32 chain.c32 mboot.c32 menu.c32 sanboot.c32 vesamenu.c32
Dos d'aquest fitxers són menus: menu.c32 i vesamenu.c32.
Podeu veure exemples de les diferents pantalles a:
http://syslinux.zytor.com/wiki/index.php/Screenshots
Segons la documentació:
The simple menu system is a single module located at com32/modules/vesamenu.c32 (graphical) or com32/modules/menu.c32 (text mode only). It uses the same configuration file as the regular SYSLINUX command line, and displays all the LABEL statements.
Per tant la opció:
default vesamenu.c32
Indica un menú gràfic
Segons la documentació:
The simple menu system is a single module located at com32/modules/vesamenu.c32 (graphical) or com32/modules/menu.c32 (text mode only). It uses the same configuration file as the regular SYSLINUX command line, and displays all the LABEL statements.
Per tant la opció:
default menu.c32
Indica un menú de text:
Es poden indicar amb el símbol ^. Un exemple:
# Soft Cap Linux LABEL softcap MENU LABEL Soft Cap ^Linux 9.6.36 KERNEL softcap-9.6.36.bzi APPEND whatever
La drecera serà la tecla L.
Només s'aplica al menú gràfic vesamenu.c32:
MENU BACKGROUND background For vesamenu.c32, sets the background image. The background can either be a color (see MENU COLOR) or the name of an image file, which should be 640x480 pixels and either in PNG or JPEG format.
La imatge ha de ser:
Hi ha una sèrie de paràmetres que permeten canviar els missatges per defecte:
Del fitxer README.menu:
MENU AUTOBOOT message' Replaces the message "Automatic boot in # second{,s}...". The symbol # is replaced with the number of seconds remaining. The syntax "{singular,[dual,]plural}" can be used to conjugate appropriately. MENU TABMSG message
Replaces the message "Press [Tab] to edit options".
MENU NOTABMSG message Takes the place of the TABMSG message if option editing is disabled. Defaults to blank. MENU PASSPROMPT message Replaces the message "Password required".
Segons el fitxer README.menu:
MENU COLOR element ansi foreground background shadow Sets the color of element "element" to the specified color sequence: screen Rest of the screen border Border area title Title bar unsel Unselected menu item hotkey Unselected hotkey sel Selection bar hotsel Selected hotkey scrollbar Scroll bar tabmsg Press [Tab] message cmdmark Command line marker cmdline Command line pwdborder Password box border pwdheader Password box header pwdentry Password box contents timeout_msg Timeout message timeout Timeout counter help Help text msgXX Message (F-key) file attribute XX ... where XX is two hexadecimal digits (the "plain text" is 07). "ansi" is a sequence of semicolon-separated ECMA-48 Set Graphics Rendition (<ESC>[m) sequences: 0 reset all attributes to their defaults 1 set bold 4 set underscore (simulated with color on a color display) 5 set blink 7 set reverse video 22 set normal intensity 24 underline off 25 blink off 27 reverse video off 30 set black foreground 31 set red foreground 32 set green foreground 33 set brown foreground 34 set blue foreground 35 set magenta foreground 36 set cyan foreground 37 set white foreground 38 set underscore on, set default foreground color 39 set underscore off, set default foreground color 40 set black background 41 set red background 42 set green background 43 set brown background 44 set blue background 45 set magenta background 46 set cyan background 47 set white background 49 set default background color
These are used (a) in text mode, and (b) on the serial console.
"foreground" and "background" are color codes in #AARRGGBB notation, where AA RR GG BB are hexadecimal digits for alpha (opacity), red, green and blue, respectively. #00000000 represents fully transparent, and #ffffffff represents opaque white.
"shadow" controls the handling of the graphical console text shadow. Permitted values are "none" (no shadowing), "std" or "standard" (standard shadowing - foreground pixels are raised), "all" (both background and foreground raised), and "rev" or "reverse" (background pixels are raised.) If any field is set to "*" or omitted (at the end of the line) then that field is left unchanged. The current defaults are: menu color screen 37;40 #80ffffff #00000000 std menu color border 30;44 #40000000 #00000000 std menu color title 1;36;44 #c00090f0 #00000000 std menu color unsel 37;44 #90ffffff #00000000 std menu color hotkey 1;37;44 #ffffffff #00000000 std menu color sel 7;37;40 #e0000000 #20ff8000 all menu color hotsel 1;7;37;40 #e0400000 #20ff8000 all menu color scrollbar 30;44 #40000000 #00000000 std menu color tabmsg 31;40 #90ffff00 #00000000 std menu color cmdmark 1;36;40 #c000ffff #00000000 std menu color cmdline 37;40 #c0ffffff #00000000 std menu color pwdborder 30;47 #80ffffff #20ffffff std menu color pwdheader 31;47 #80ff8080 #20ffffff std menu color pwdentry 30;47 #80ffffff #20ffffff std menu color timeout_msg 37;40 #80ffffff #00000000 std menu color timeout 1;37;40 #c0ffffff #00000000 std menu color help 37;40 #c0ffffff #00000000 std menu color msg07 37;40 #90ffffff #00000000 std
MENU WIDTH 80 MENU MARGIN 10 MENU PASSWORDMARGIN 3 MENU ROWS 12 MENU TABMSGROW 18 MENU CMDLINEROW 18 MENU ENDROW -1 MENU PASSWORDROW 11 MENU TIMEOUTROW 20 MENU HELPMSGROW 22 MENU HELPMSGENDROW -1 MENU HIDDENROW -2 MENU HSHIFT 0 MENU VSHIFT 0 These options control the layout of the menu on the screen. The values above are the defaults. A negative value is relative to the calculated length of the screen (25 for text mode, 28 for VESA graphics mode.)
# A very dense operating system LABEL brick MENU LABEL ^Windows CE/ME/NT KERNEL chain.c32 APPEND hd0 2
Utilitzeu la opció MENU HIDE:
# A very dense operating system LABEL brick MENU LABEL ^Windows CE/ME/NT MENU HIDE KERNEL chain.c32 APPEND hd0 2
Segons l'ajuda cal utilitzar la opció MENU PASSWD passwd:
MENU PASSWD passwd (Only valid after a LABEL statement.) Sets a password on this menu entry. "passwd" can be either a cleartext password, a SHA-1 encrypted password (starting with $4$), or and MD5 encrypted password (starting with $1$). Use the included Perl scripts "sha1pass" or "md5pass" to encrypt passwords. MD5 passwords are compatible with most Unix password file utilities; SHA-1 passwords are probably unique to SYSLINUX. Obviously, if you don't encrypt your passwords they will not be very secure at all. If you are using passwords, you want to make sure you also use the settings "NOESCAPE 1", "PROMPT 0", and either set "ALLOWOPTIONS 0" or use a master password (see below.) If passwd is an empty string, this menu entry can only be unlocked with the master password.
$ locate sha1pass /opt/drbl/bin/drbl-sha1pass
Es pot fer amb la tecla tabulador (Tab). Només es poden modificar sí ALLOW_OPTIONS és diferent de 0:
ALLOWOPTIONS 1
També cal tenir en compte que si hi ha una paraula de pas mestre:
MENU MASTER PASSWD is set, they require the master password.
Us la demanarà abans de poder modificar opcions.
Per tal de crear una paraula de pas MD5:
$ echo "paraula_de_pas" | mkpasswd -s -H MD5
La comanda mkpasswd la proporciona el paquet whois:
$ dpkg -S /usr/bin/mkpasswd whois: /usr/bin/mkpasswd $ sudo apt-get install whois
Per tal de crear una paraula de pas SHA1:
$ echo "paraula_de_pas" | mkpasswd -s -H SHA-256 $5$9TbEqP3x2aXhA4tM$tUk0UJSwnIKY2yGH7Q3YzLZYdChpIoB2SiGXseuLz/8
o
$ echo "paraula_de_pas" | mkpasswd -s -H SHA-512 $6$.dQaPW/BXc27J2VI$dpzn1whsO2joH9qW234ySE0WhsDCuDgRTwTk9ChrSSQTW6RdutFGPJkZt74e3nXmCEj59Fpcfc2Aj/9f.3Byy.
Recursos:
Es pot fer amb les opcions:
MENU HIDDEN ...
TIMEOUT 30
TODO:
All you need to do is download the latest syslinux and add a few modified commans to the default file in the TFTP folder.
[code]LABEL Dell Diagnostics MENU MASTER PASSWD $1$i1F7UfKo$QqU46ACYw5s/nsc29.9Bm0 kernel fog/acronis/memdisk append[b] iso [/b]initrd=fog/acronis/acronis.iso [b]raw[/b] MENU LABEL Acronis True Image TEXT HELP PXE Boots Acronis True Image ENDTEXT[/code]
MENU BEGIN [tagname] MENU END Begin/end a submenu. The entries between MENU BEGIN and MENU END form a submenu, which is marked with a > mark on the right hand of the screen. Submenus inherit the properties of their parent menus, but can override them, and can thus have their own backgrounds, master passwords, titles, timeouts, messages and so forth. MENU GOTO tagname (Only valid after a LABEL statement.) This label will transfer to the named submenu instead of booting anything. To transfer to the top-level menu, specify "menu goto .top". MENU EXIT [tagname] (Only valid after a label statement inside MENU BEGIN ... MENU END) Exit to the next higher menu, or, if tagname is specified, to the named menu. MENU QUIT (Only valid after a LABEL statement.) This label quits the menu system.
WARNING: if MENU MASTER PASSWD or ALLOWOPTIONS 0 is set, this will still allow exiting to the CLI; however, a separate MENU PASSWD can of course be set for this label.
MENU START (Only valid inside MENU BEGIN ... MENU END) Indicates that the menu system should start at the menu being defined instead of at the top-level menu. INCLUDE filename [tagname] MENU INCLUDE filename [tagname] Include the contents of the configuration file filename at this point. In the case of MENU INCLUDE, the included data is only seen by the menu system; the core syslinux code does not parse this command, so any labels defined in it are unavailable.
If a tagname is included, the whole file is considered to have been bracketed with a MENU BEGIN tagname ... MENU END pair, and will therefore show up as a submenu.