#!ipxe :start set url http://tsaukpaetra.com:8000/iPXE #Check if we're on the internal network or external, rewrite URL if internal nslookup internal namp.home.tsaukpaetra.com && set url http://${internal}:8000/iPXE || console --x 1024 --y 768 && console -p backbig.png --left 64 --right 64 --top 64 --bottom 64 && goto setup_settings || console -p back.png --left 32 --right 32 --top 32 --bottom 48 && goto setup_settings || goto bad_console goto setup_settings :bad_console cpair -f 7 -b 0 1 # main cpair -f 6 -b 4 2 # current selection cpair -f 1 -b 0 3 # separator cpair -f 8 -b 0 4 # menu selection :setup_settings #Some things... set space:hex 20:20 set space ${space:string} set esc:hex 1b # ANSI escape character - "^[" set cls ${esc:string}[2J${esc:string}H # ANSI clear screen sequence - "^[[2J" with cursor reset echo ${cls} isset ${arch} && goto skip_arch_detect || cpuid --ext 29 && set arch x86_64 || set arch i386 :skip_arch_detect #isset ${menu} && goto ${menu} || # iSCSI server location and iSCSI IQNs # Must be specified as an IP, some clients have issues with name resolution # Initiator IQN is also calculated to use hostname, if present set iscsi-server 192.168.1.77 set base-iqn iqn.com.tsaukpaetra set base-iscsi iscsi:${iscsi-server}::::${base-iqn} isset ${hostname} && set initiator-iqn ${base-iqn}:${hostname} || set initiator-iqn ${base-iqn}:${mac} :main_menu menu Tsaukpaetra.com Boot Menu [Local IP: ${net0/ip}] item local Boot local system item --gap Tools and Installers: item pxeknife ${space} PXE Knife item pmagic ${space} Parted Magic item wimboot ${space} Windows PE item linux ${space} Linux item --gap Options: item poweroff ${space} Turn off machine item reboot ${space} Reboot off machine item shell ${space} Enter Shell choose --default local --timeout 10000 menu || goto local echo ${cls} goto ${menu} || chain -ar ${url}/${menu}.ipxe || goto error goto main_menu :error echo Error occured, press any key to return to menu ... (Ctrl-S for shell) prompt --key 0x13 && goto shell || goto main_menu :local echo Booting from local disks ... sanboot --no-describe --drive 0x80 :poweroff poweroff :reboot reboot :shell echo Entering shell. Type 'exit' to return to menu. shell goto main_menu :wimboot chain -ar ${url}/wimboot.php || goto error goto main_menu :linux chain -ar ${url}/linux.php || goto error goto main_menu