#!ipxe console --x 1024 --y 768 console --picture http://boot.hegars.com/ipxe.png #console --picture http://boot.hegars.com/texture.png --left 32 --right 32 --top 32 --bottom 48 # Some menu defaults set menu-timeout 30000 set submenu-timeout ${menu-timeout} isset ${menu-default} || set menu-default exit # Figure out if client is 64-bit capable cpuid --ext 29 && set arch x64 || set arch x86 cpuid --ext 29 && set archl amd64 || set archl i386 ###################### MAIN MENU #################################### :start #menu menu iPXE boot menu for ${initiator-iqn} item --gap -- ------------------------- Operating systems ------------------------------ item --key f freedos Boot FreeDOS item demo Boot Demo Linux item --gap -- ------------------------- Tools and utilities ---------------------------- item --key d menu-diag Diagnostics tools... item --gap -- ------------------------- Advanced options ------------------------------- item --key c config Configure settings item shell Drop to iPXE shell item reboot Reboot computer item item --key x exit Exit iPXE and continue BIOS boot choose --timeout ${menu-timeout} --default ${menu-default} selected || goto cancel set menu-timeout 0 goto ${selected} :cancel echo You cancelled the menu, dropping you to a shell :shell echo Type 'exit' to get the back to the menu shell set menu-timeout 0 set submenu-timeout 0 goto start :failed echo Booting failed, dropping to shell goto shell :reboot reboot :exit exit :config config goto start :back set submenu-timeout 0 clear submenu-default goto start #choose --default exit --timeout 3000 target && goto ${target} #prompt --key 0x02 --timeout 20000 Press Ctrl-B for the iPXE command line... && shell || ###################### DIAGNOSTICS MENU ############################# # :menu-diag menu Diagnostic tools item memtest Memtest86+ 4.20 item item --key 0x08 back Back to top menu... iseq ${menu-default} menu-diag && isset ${submenu-default} && goto menu-diag-timed || choose selected && goto ${selected} || goto start #Boot Demo # :demo kernel vmlinuz-3.16.0-rc4 bootfile=http://boot.hegars.com/ fastboot initrd=initrd.img initrd initrd.img boot :freedos echo Booting FreeDOS from iSCSI for ${initiator-iqn} set root-path ${base-iscsi}:${hostname}.boot.freedos sanboot ${root-path} || goto failed goto start #pxe shell # :shell shell :memtest #ODO: Fix the URI parser to make the + sign work #chain memtest86+-4.20.elf.img - || goto failed #chain memtest86plus-4.20.elf.img - || goto failed chain memtest86+-5.31b.bin - || goto failed goto start