david/ipxe
david
/
ipxe
Archived
1
0
Fork 0
This repository has been archived on 2020-12-06. You can view files and clone it, but cannot push or open issues or pull requests.
ipxe/src/embed.ipxe

151 lines
3.6 KiB
Plaintext
Raw Normal View History

2017-11-05 16:19:00 +01:00
#!ipxe
2017-11-25 23:10:38 +01:00
# embedded ipxe script for netbooting from various sources
2017-11-05 16:19:00 +01:00
2017-11-25 23:10:38 +01:00
echo Activating first network device.
echo Commencing network boot.
2017-11-05 16:19:00 +01:00
:dhcp
dhcp net0 || goto dhcp
2017-11-25 23:10:38 +01:00
# configuration
## console
2017-11-05 16:19:00 +01:00
colour --basic 9 4
2017-11-06 18:47:03 +01:00
colour --basic 6 1
2017-11-05 16:19:00 +01:00
2017-11-25 23:10:38 +01:00
## variables
set iscsi_portal 10.1.5.2
## iscsi targets
set iqn-discovery-esxi iscsi:${iscsi_portal}::::iqn.2000-01.com.synology:spacedock.discovery-esxi.e84d7761fd
set iqn-ghost-windows81 iscsi:${iscsi_portal}::::iqn.2000-01.com.synology:spacedock.ghost-windows81.e84d7761fd
set iqn-ghost-archlinux iscsi:${iscsi_portal}::::iqn.2000-01.com.synology:spacedock.ghost-archlinux.e84d7761fd
set iqn-ghost-antergos iscsi:${iscsi_portal}::::iqn.2000-01.com.synology:spacedock.ghost-antergos.e84d7761fd
# jump to ip specific config
:custom
goto ${net0/ip} || goto menu
# print main boot menu
2017-11-05 16:19:00 +01:00
:menu
2017-11-25 23:10:38 +01:00
menu Boot options:
2017-11-05 16:19:00 +01:00
item --gap MAC Address: ${net0/mac}
item --gap IP Address: ${net0/ip}
item --gap Netmask: ${net0/netmask}
item --gap Gateway: ${net0/gateway}
item --gap DNS: ${net0/dns}
item
item localboot Boot from local disks
item
item aecat Boot from https://boot.aec.at
item netbootxyz Boot from https://boot.netboot.xyz
item
item advanced Advanced iPXE options
2017-11-25 23:10:38 +01:00
choose target && goto ${target}
2017-11-05 16:19:00 +01:00
goto menu
:advanced
menu Advanced iPXE options:
item --gap MAC Address: ${net0/mac}
item --gap IP Address: ${net0/ip}
item --gap Netmask: ${net0/netmask}
item --gap Gateway: ${net0/gateway}
item --gap DNS: ${net0/dns}
item
item reboot Reboot system
item exit Exit and continue local boot
item dhcp Renew IP address
item shell Drop to iPXE shell
item settings Open settings dialog
choose target && goto ${target}
goto advanced
2017-11-25 23:10:38 +01:00
:exit
exit
:config
config || goto menu
goto menu
2017-11-05 16:19:00 +01:00
2017-11-25 23:10:38 +01:00
:reboot
echo Rebooting system
sleep 2
reboot
:shell
shell
# boot options
## boot from local disks
2017-11-05 16:19:00 +01:00
:localboot
echo Booting from local disks
sleep 2
2017-11-06 18:47:03 +01:00
sanboot --no-describe --drive 0x80 || goto menu
2017-11-05 16:19:00 +01:00
2017-11-25 23:10:38 +01:00
## boot.aec.at
2017-11-05 16:19:00 +01:00
:aecat
echo Booting from the Ars Electronica Netboot Server (https://boot.aec.at)
sleep 2
set conn_type https
chain --autofree https://boot.aec.at/menu.ipxe || echo HTTPS failed... attempting HTTP...
set conn_type http
chain --autofree http://boot.aec.at/menu.ipxe || goto menu
2017-11-25 23:10:38 +01:00
## netboot.xyz
2017-11-05 16:19:00 +01:00
:netbootxyz
echo Booting from netboot.xyz (https://boot.netboot.xyz)
sleep 2
set conn_type https
chain --autofree https://boot.netboot.xyz/menu.ipxe || echo HTTPS failed... attempting HTTP...
set conn_type http
chain --autofree http://boot.netboot.xyz/menu.ipxe || goto menu
2017-11-25 23:10:38 +01:00
## GHOST - Windows 8.1
:windows81
echo Booting into Windows 8.1 from ISCSI.
set net0/keep-san 1
sleep 1
sanboot --keep ${iqn-ghost-windows81} || goto menu
## GHOST - Archlinux
:archlinux
echo Booting into Archlinux from ISCSI.
set net0/keep-san 1
sleep 1
sanboot --keep ${iqn-ghost-archlinux} || goto menu
## GHOST - Antergos
:antergos
echo Booting into Antergos from ISCSI.
set net0/keep-san 1
sleep 1
sanboot --keep ${iqn-ghost-antergos} || goto menu
## Custom boot for 10.1.5.4 (discovery_iscsi)
:10.1.5.4
echo Booting into VMWare ESXi 6.5 from ISCSI.
set net0/keep-san 1
sanboot --keep ${iqn-discovery-esxi} || goto menu
## Custom boot for 10.1.5.3 (ghost_iscsi)
:10.1.5.3
menu GHOST boot options
item --gap MAC Address: ${net0/mac}
item --gap IP Address: ${net0/ip}
item --gap Netmask: ${net0/netmask}
item
item antergos Boot into Antergos
item archlinux Boot into Archlinux
item windows81 Boot into Windows 8.1
item
item advanced Advanced iPXE options
item
2017-11-05 16:19:00 +01:00
2017-11-25 23:10:38 +01:00
choose target && goto ${target}
2017-11-25 23:33:06 +01:00
goto ${net0/ip} || goto menu
2017-11-05 16:19:00 +01:00