adding ipxe boot file

This commit is contained in:
toby 2019-02-24 08:55:52 +00:00
parent 80023b30f1
commit fb1756043f
3 changed files with 70 additions and 0 deletions

View File

@ -1,3 +1,4 @@
files/kernel/* /srv/tftp/wit-pxeboot/
files/boot/* /srv/tftp/boot/
files/grub-addon-amd64.cfg /srv/tftp/boot/grub/
files/wit.ipxe /srv/tftp/boot/

View File

@ -1,3 +1,4 @@
files/kernel/* /srv/tftp/wit-pxeboot/
files/boot/* /srv/tftp/boot/
files/grub-addon-arm64.cfg /srv/tftp/boot/grub/
files/wit.ipxe /srv/tftp/boot/

68
files/wit.ipxe Normal file
View File

@ -0,0 +1,68 @@
#!ipxe
set menu-timeout 5000
set submenu-timeout ${menu-timeout}
set menu-default localboot
:start
menu iPXE boot menu
item --gap -- ------------------------- Operating systems ------------------------------
item --key d debcore Boot Debcore from tftp
item --key l localboot Exit iPXE and continue boot
item --gap -- ------------------------------ Options -----------------------------------
item --key c config Configure settings
item --key s shell Drop to iPXE shell
item reboot Reboot computer
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
:localboot
exit
:config
config
goto start
:back
set submenu-timeout 0
clear submenu-default
goto start
############ MAIN MENU ITEMS ############
:debcore
echo Booting Debcore from tftp
kernel /wit-pxeboot/vmlinuz-amd64 initrd=initramfs-amd64.gz console=tty0 console=ttyS0,115200n8 console=ttyS1,115200n8 console=ttyAMA0,115200n8 size=5000
initrd /wit-pxeboot/initramfs-amd64.gz
boot || goto failed
goto start