#!ipxe :start set url https://boot.reslinger.net set default_mirror https://www.reslinger.net${mirror_port}/boot :start2 set mirror ${default_mirror} set sigs ${url}/sigs/ iseq ${boot_salstar_version} 1 && goto version_ok || echo echo IPXE version too old, rechaining ... chain ${url}/ipxe/ipxe.kpxe || :version_ok iseq ${cls} serial && goto ignore_cls || set cls:hex 1b:5b:4a # ANSI clear screen sequence - "^[[J" set cls ${cls:string} :ignore_cls isset ${admin_ip} || set admin_ip 109.190.129.240 isset ${arch} && goto skip_arch_detect || cpuid --ext 29 && set arch x86_64 || set arch i386 :skip_arch_detect isset ${menu} && goto ${menu} || isset ${ip} || dhcp || echo DHCP failed imgtrust :main_menu clear version set space:hex 20:20 set space ${space:string} iseq ${arch} i386 && set arch5 i586 || set arch5 ${arch} iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch} menu SAL's BOOT MENU [Local IP: ${netX/ip} on ${netX/chip}] item --gap Default: item --key l local ${space} Boot local hdd [l] item --gap Operating systems: # RPM based systems item --key f fedora ${space} Fedora ${arch} [f] item --key c centos ${space} CentOS ${arch} [c] isset ${extended_menu} && item --key S scientific ${space} Scientific Linux ${arch} [S] || isset ${extended_menu} && item --key o opensuse ${space} openSUSE ${arch} [o] || isset ${extended_menu} && item --key M mageia ${space} Mageia ${arch5} [M] || # Deb based systems item --key b debian ${space} Debian ${arch_a} [b] item --key u ubuntu ${space} Ubuntu ${arch_a} [u] # Others isset ${extended_menu} && item --key A archlinux ${space} ArchLinux [A] || isset ${extended_menu} && item --key L slackware ${space} Slackware ${bits} bit [L] || isset ${extended_menu} && item --key g gparted ${space} GParted ${bits} bit [g] || isset ${extended_menu} && item --key R sysresccd ${space} SystemRescueCd [R] || isset ${extended_menu} && item --key p pmagic ${space} Parted Magic [p] || isset ${extended_menu} && item --key z clonezilla ${space} Clonezilla [z] || isset ${extended_menu} && item --key T tinycore ${space} Tiny Core Linux [T] || isset ${extended_menu} && item --key C coreos ${space} CoreOS [C] || # BSD systems isset ${extended_menu} && item --key y bsd ${space} BSD systems [y] || # DOS item --key d dos ${space} FreeDOS [d] # Other netboot sites item --key O chained ${space} Chain other netboot sites [O] isset ${extended_menu} || item --key x extended_menu ${space} Other systems [x] item --gap Options: iseq ${arch} x86_64 && set bits 64 || set bits 32 item --key a changebits ${space} Architecture: ${arch} (${bits}bit) [a] item --key 0x09 params_menu ${space} Kernel parameters: ${params} item --gap Tools: item --key t tools ${space} Hardware tools [t] isset ${extended_menu} && item --key D nodns ${space} Disable DNS, use IPv4 address only. [D] || item --key . predefined ${space} Predefined systems menu [.] item --key , ipxecon ${space} Select iPXE console [,] item --key s shell ${space} iPXE shell [s] isset ${menu} && set timeout 0 || set timeout 60000 choose --timeout ${timeout} --default ${menu} menu || goto local echo ${cls} goto ${menu} || imgverify ${menu}.ipxe ${sigs}${menu}.ipxe.sig || goto error chain ${menu}.ipxe || goto error goto main_menu :error echo Error occured, press any key to return to menu ... prompt goto main_menu :local echo Booting from local disks ... exit 0 :reload echo Reloading menu.ipxe ... imgverify menu.ipxe ${sigs}menu.ipxe || goto error chain menu.ipxe :nodns echo Setting all URLs to use IPv4 only (no DNS) ... set url http://158.197.16.66/boot/ set default_mirror http://158.197.16.70${mirror_port}/pub clear menu goto start2 :pxelinux echo Loading pxelinux ... set next-server 158.197.16.70 set 209:string pxelinux.cfg/default set 210:string tftp://${next-server}/ kernel ${url}pxelinux.0 imgverify pxelinux.0 ${sigs}pxelinux.0.sig || goto error boot :tools imgverify tools.ipxe ${sigs}tools.ipxe.sig || goto error chain tools.ipxe || goto error goto main_menu :shell echo Type "exit" to return to menu. # temporarily disable imgtrust for shell imgtrust --allow set menu main_menu shell imgtrust || goto main_menu :changebits iseq ${arch} x86_64 && set arch i386 || set arch x86_64 goto main_menu # this is not used yet :select_arch menu Select architecture item --gap Basic: item --key 3 i386 i386 (32 bit) [3] item --key 6 x86_64 x86_64/amd64 (64 bit) [6] item --gap Extended: item i486 i486 item i586 i586 item i686 i686 choose --default ${march} march || goto main_menu goto set_arch_${march} :set_arch_i386 set arch i386 set arch_a i386 set xarch x86 goto main_menu :set_arch_x86_64 set arch x86_64 set arch_a amd64 set xarch x64 goto main_menu :set_arch_i486 set arch i386 set arch_a i386 set xarch x86 goto main_menu :set_arch_i586 set arch i386 set arch_a i386 set xarch x86 goto main_menu :set_arch_i686 set arch i386 set arch_a i386 set xarch x86 goto main_menu :params_menu isset ${kp_default} || set kp_default set menu Kernel parameters item --gap Current: ${params} item --gap #item --key x exit Return to main menu [x] item --key e set Edit parameters [e] item --key a autopart Autopartition [a] item --key d disks Disk selection [d] item --key p pkgs Package selection [p] item --key s serial Serial console ttyS0/ttyS1 [s] item --key v vnc VNC installation [v] item --key m nomodeset Disable KMS (nomodeset) [m] item --key t text Text mode install [t] item --key l lang Force en_US language [l] item --key w passwd Change predefined root password [w] item --key c custom_config Custom configuration URL [c] item --key n network Network configuration (bonding or static) [n] item --key k ksdevice ksdevice configuration [k] choose --default ${kp_default} kp || goto main_menu echo ${cls} goto params_${kp} # Kernel parameters :params_set set kp_default set echo -n Enter parameters: ${} && read params goto params_menu :params_vnc set kp_default vnc set params ${params} vnc vncconnect=${admin_ip}:5500 goto params_menu :params_serial set kp_default serial menu Serial console speed item --key 0 ttyS0 ttyS0 - com1, don't set speed [0] item --key a ttyS0,115200 ttyS0,115200 [a] item --key b ttyS0,57600 ttyS0,57600 [b] item --key c ttyS0,38400 ttyS0,38400 [c] item --key d ttyS0,9600 ttyS0,9600 [d] item --key 1 ttyS1 ttyS1 - com2, don't set speed [1] item --key 2 ttyS1,115200 ttyS1,115200 [2] item --key 3 ttyS1,57600 ttyS1,57600 [3] item --key 4 ttyS1,38400 ttyS1,38400 [4] item --key 5 ttyS1,9600 ttyS1,9600 [5] choose serial_console || goto params_menu set params ${params} console=${serial_console} goto params_menu :params_text set kp_default text set params ${params} text nomodeset goto params_menu :params_lang set kp_default lang set params ${params} lang=fr_FR.UTF-8 goto params_menu :params_passwd set kp_default passwd echo If passowrd starts with "$", it's treated as crypted. echo -n Enter root password: ${} && read root_passwd set params ${params} passwd=${root_passwd} goto params_menu :params_custom_config set kp_default custom_config echo -n Enter custom config URL: ${} && read custom_config_url set params ${params} config=${custom_config_url} goto params_menu :params_network set kp_default network menu Network configuration item --key b bond Set bonding device on em1/em2 [b] item --key f fedora Fedora/CentOS 7 style (dracut options) [f] item --key c centos CentOS 5/6 style [c] choose netos || goto params_menu iseq ${netos} bond && set params ${params} bond=bond_wan:em1,em2:mode=802.3ad,miimon=100,lacp_rate=1,xmit_hash_policy=1 || iseq ${netos} bond && set ksdevice bond_wan #set params ${params} ip=${ip}:${next-server}:${gateway}:${netmask}::bond_wan BOOTIF=bond_wan iseq ${netos} fedora && set params ${params} ip=${ip}::${gateway}:${netmask}:${ip}::none nameserver=${dns} || iseq ${netos} centos && set params ${params} ip=${ip} gateway=${gateway} netmask=${netmask} dns=${dns} || goto params_menu :params_ksdevice set kp_default ksdevice menu KSDevice configuration item --key l link ksdevice=link [l] item --key 0 eth0 ksdevice=eth0 [0] item --key 1 eth1 ksdevice=eth1 [1] item --key 2 eth2 ksdevice=eth2 [2] item --key 3 eth3 ksdevice=eth3 [3] item --key w bond_wan ksdevice=bond_wan [w] item --key b bootif ksdevice=bootif (default) [b] choose ksdevice || goto params_menu goto params_menu :params_nomodeset set kp_default nomodeset set params ${params} nomodeset goto params_menu :params_autopart set kp_default autopart menu Autopartition item --key t root4max part=root=4,vg=vg1,swap=1 [t] item --key 4 root4 part=root=4,swap=1 [4] item --key 3 root3 part=root=3,swap=1 [3] item --key m homemax part=root=4,vg=vg1,swap=2,home=max [m] item --gap These are for large disks (>=2 TB) item --key b biosboot part=biosboot=2m,root=4,swap=1 [b] item --key g gpt gpt part=biosboot=2m,root=4,swap=1 [g] choose autopart || goto params_menu iseq ${autopart} root4max && set params ${params} part=root=4,vg=vg1,swap=1 || iseq ${autopart} root4 && set params ${params} part=root=4,swap=1 || iseq ${autopart} root3 && set params ${params} part=root=3,swap=1 || iseq ${autopart} homemax && set params ${params} part=root=4,vg=vg1,swap=2,home=max || iseq ${autopart} biosboot && set params ${params} part=biosboot=2m,root=4,swap=1 || iseq ${autopart} gpt && set params ${params} gpt part=biosboot=2m,root=4,swap=1 || goto params_menu :params_disks set kp_default disks menu Disk selection item --gap Virtual servers (guests) item --key 2 mirror vda, vdb [2] item --key 1 vda vda only [1] item --gap Physical servers (hosts) item --key b mirror_sd sda, sdb [b] item --key a sda sda only [a] choose disks || goto params_menu iseq ${disks} mirror && set params ${params} disks=vda,vdb || iseq ${disks} vda && set params ${params} disks=${disks} || iseq ${disks} mirror_sd && set params ${params} disks=sda,sdb || iseq ${disks} sda && set params ${params} disks=${disks} || goto params_menu :params_pkgs set kp_default pkgs menu Package selection item --key b core Core salpack only [c] item --key g guestnrpe Guest with NRPE [g] item --key k kvmnrpe KVM host with NRPE [k] item --key w web Guest web server with mariadb and NRPE [w] item --key m mail Guest mail server with mariadb and NRPE [m] item --key n nrpe Core and NRPE salpack [n] choose pkgs || goto params_menu iseq ${pkgs} core && set params ${params} pkgs=salpack || iseq ${pkgs} guestnrpe && set params ${params} pkgs=salpack-nrpe,salpack-guest,-*-firmware || iseq ${pkgs} kvmnrpe && set params ${params} pkgs=salpack-nrpe,salpack-kvm || iseq ${pkgs} web && set params ${params} pkgs=salpack-nrpe,salpack-guest,salpack-web,salpack-mariadb,-*-firmware || iseq ${pkgs} mail && set params ${params} pkgs=salpack-nrpe,salpack-guest,salpack-mail,salpack-mariadb,-*-firmware || iseq ${pkgs} nrpe && set params ${params} pkgs=salpack-nrpe,-*-firmware || goto params_menu :extended_menu isset ${extended_menu} && clear extended_menu || set extended_menu 1 goto main_menu # OS :fedora :centos :scientific imgverify fedora.ipxe ${sigs}fedora.ipxe.sig || goto error chain fedora.ipxe || goto error goto main_menu :debian :ubuntu imgverify deb.ipxe ${sigs}deb.ipxe.sig || goto error chain deb.ipxe || goto error goto main_menu # Predefined systems :predefined imgverify predefined.ipxe ${sigs}predefined.ipxe.sig || goto error chain predefined.ipxe || goto error goto main_menu # Select iPXE console :ipxecon menu Select iPXE console item --key v vga VGA only [v] item --key 0 ttyS0 VGA + ttyS0 (com1) [0] item --key 1 ttyS1 VGA + ttyS1 (com2) [1] choose ipxecon || goto main_menu iseq ${ipxecon} vga && set ipxecondir ipxe/ || iseq ${ipxecon} ttyS0 && set ipxecondir ipxe/com1/ || iseq ${ipxecon} ttyS1 && set ipxecondir ipxe/com2/ || set ipxeconurl ${ipxecondir}ipxe.lkrn imgfree kernel ${ipxeconurl} || goto error imgverify ipxe.lkrn ${sigs}${ipxecondir}ipxe.lkrn.sig || goto error boot goto main_menu