aboutsummaryrefslogtreecommitdiffstats
path: root/examples/tg19/pxe
diff options
context:
space:
mode:
Diffstat (limited to 'examples/tg19/pxe')
-rw-r--r--examples/tg19/pxe/README.md1
-rw-r--r--examples/tg19/pxe/http/README.md1
-rw-r--r--examples/tg19/pxe/http/bg.pngbin0 -> 189905 bytes
-rw-r--r--examples/tg19/pxe/http/boot.cfg98
-rw-r--r--examples/tg19/pxe/http/menu.ipxe85
5 files changed, 185 insertions, 0 deletions
diff --git a/examples/tg19/pxe/README.md b/examples/tg19/pxe/README.md
new file mode 100644
index 0000000..c03e452
--- /dev/null
+++ b/examples/tg19/pxe/README.md
@@ -0,0 +1 @@
+Built on https://github.com/antonym/netboot.xyz and ipxe.
diff --git a/examples/tg19/pxe/http/README.md b/examples/tg19/pxe/http/README.md
new file mode 100644
index 0000000..fefc164
--- /dev/null
+++ b/examples/tg19/pxe/http/README.md
@@ -0,0 +1 @@
+All other files are fetched from https://github.com/antonym/netboot.xyz
diff --git a/examples/tg19/pxe/http/bg.png b/examples/tg19/pxe/http/bg.png
new file mode 100644
index 0000000..74f5977
--- /dev/null
+++ b/examples/tg19/pxe/http/bg.png
Binary files differ
diff --git a/examples/tg19/pxe/http/boot.cfg b/examples/tg19/pxe/http/boot.cfg
new file mode 100644
index 0000000..798dda8
--- /dev/null
+++ b/examples/tg19/pxe/http/boot.cfg
@@ -0,0 +1,98 @@
+#!ipxe
+
+:global_vars
+# set site name
+set site_name The Gathering 2019
+
+# set boot domain
+set boot_domain boot.tg19.gathering.org
+
+# set location of memdisk
+set memdisk http://${boot_domain}/memdisk
+
+# signature check enabled?
+set sigs_enabled false
+
+# image signatures check enabled?
+set img_sigs_enabled false
+
+# set location of signatures for sources
+set sigs http://${boot_domain}/sigs/
+
+# set location of latest iPXE
+set ipxe_disk netboot.xyz-undionly.kpxe
+
+# set location of background image
+set bg_image http://${boot_domain}/bg.png
+
+##################
+# official mirrors
+##################
+:mirrors
+### Alpine Linux
+set alpinelinux_mirror dl-cdn.alpinelinux.org
+set alpinelinux_base_dir alpine
+
+### ArchLinux
+set archlinux_mirror mirror.rackspace.com
+set archlinux_base_dir archlinux
+
+### CentOS
+set centos_mirror mirror.centos.org
+set centos_base_dir centos
+
+### Debian
+set debian_mirror deb.debian.org
+set debian_base_dir debian
+
+### Devuan
+set devuan_mirror auto.mirror.devuan.org
+set devuan_base_dir devuan
+
+### Fedora
+set fedora_mirror mirrors.kernel.org
+set fedora_base_dir fedora
+
+### Mageia
+set mageia_mirror mirrors.kernel.org
+set mageia_base_dir mageia
+
+### OpenSUSE
+set opensuse_mirror download.opensuse.org
+set opensuse_base_dir distribution/leap
+
+### Slackware
+set slackware_mirror mirror.rackspace.com
+set slackware_base_dir slackware
+
+### Ubuntu
+set ubuntu_mirror archive.ubuntu.com
+set ubuntu_base_dir ubuntu
+
+#################################################
+# determine architectures and enable menu options
+#################################################
+:architectures
+set menu_linux 1
+set menu_bsd 1
+set menu_freedos 1
+set menu_live 1
+set menu_security 1
+set menu_utils 1
+iseq ${buildarch} i386 && goto x86_64 ||
+iseq ${buildarch} x86_64 && goto x86_64 ||
+iseq ${buildarch} arm64 && goto arm64 ||
+goto architectures_end
+:x86_64
+goto architectures_end
+:arm64
+set menu_freedos 0
+set menu_live 0
+set menu_security 0
+set menu_utils 0
+goto architectures_end
+:architectures_end
+goto end
+
+:end
+exit
diff --git a/examples/tg19/pxe/http/menu.ipxe b/examples/tg19/pxe/http/menu.ipxe
new file mode 100644
index 0000000..90aa41c
--- /dev/null
+++ b/examples/tg19/pxe/http/menu.ipxe
@@ -0,0 +1,85 @@
+#!ipxe
+
+:start
+chain --autofree boot.cfg ||
+iseq ${cls} serial && goto ignore_cls ||
+set cls:hex 1b:5b:4a # ANSI clear screen sequence - "^[[J"
+set cls ${cls:string}
+:ignore_cls
+
+isset ${arch} && goto skip_arch_detect ||
+cpuid --ext 29 && set arch x86_64 || set arch i386
+iseq ${buildarch} arm64 && set arch arm64 ||
+:skip_arch_detect
+isset ${menu} && goto ${menu} ||
+
+isset ${ip} || dhcp || echo DHCP failed
+
+:main_menu
+console --x 640 --y 480
+console --picture ${bg_image} --left 240 --right 10 --top 15 --bottom 32
+clear menu
+set space:hex 20:20
+set space ${space:string}
+iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch}
+menu ${site_name}
+item --gap Default:
+item local ${space} Boot from local disk
+item --gap Distributions:
+iseq ${menu_linux} 1 && item linux ${space} Linux Installs ||
+#iseq ${menu_bsd} 1 && item bsd ${space} BSD Installs ||
+#iseq ${menu_freedos} 1 && item freedos ${space} FreeDOS ||
+iseq ${menu_live} 1 && item live ${space} Live Boot ||
+iseq ${menu_security} 1 && item security ${space} Security Related ||
+item --gap Tools:
+iseq ${menu_utils} 1 && item utils ${space} Utilities ||
+iseq ${arch} x86_64 && set bits 64 || set bits 32
+item changebits ${space} Architecture: ${arch} (${bits}bit)
+item shell ${space} iPXE shell
+item netinfo ${space} Network card info
+item
+item --gap Har du problemer?
+item --gap Ta kontakt med Tech:Support
+item --gap i servicedesk.
+isset ${menu} && set timeout 0 || set timeout 5000
+choose --timeout ${timeout} --default ${menu} menu || goto local
+echo ${cls}
+goto ${menu} ||
+iseq ${sigs_enabled} true && goto verify_sigs || goto change_menu
+
+:verify_sigs
+imgverify ${menu}.ipxe ${sigs}${menu}.ipxe.sig || goto error
+goto change_menu
+
+:change_menu
+chain ${menu}.ipxe || goto error
+goto main_menu
+
+:error
+echo
+echo Error occured
+echo Press any key to return to menu ...
+prompt
+goto main_menu
+
+:local
+echo Booting from local disks ...
+exit 0
+
+:shell
+echo Type "exit" to return to menu.
+set menu main_menu
+shell
+goto main_menu
+
+:changebits
+iseq ${arch} x86_64 && set arch i386 || set arch x86_64
+goto main_menu
+
+:sig_check
+iseq ${sigs_enabled} true && set sigs_enabled false || set sigs_enabled true
+goto main_menu
+
+:img_sigs_check
+iseq ${img_sigs_enabled} true && set img_sigs_enabled false || set img_sigs_enabled true
+goto main_menu