aboutsummaryrefslogtreecommitdiff
path: root/menu.ipxe
diff options
context:
space:
mode:
authordiogo464 <[email protected]>2025-10-11 11:34:59 +0100
committerdiogo464 <[email protected]>2025-10-11 11:34:59 +0100
commit521218ce06fbb7bd518eb6a069406936079e3ec2 (patch)
tree862e84ec23175119abb7652e197a4113e7fcc31b /menu.ipxe
parent89db26c86bf48a4c527778fc254765a38b7e9085 (diff)
initial working version
Diffstat (limited to 'menu.ipxe')
-rw-r--r--menu.ipxe121
1 files changed, 121 insertions, 0 deletions
diff --git a/menu.ipxe b/menu.ipxe
new file mode 100644
index 0000000..cf4f20b
--- /dev/null
+++ b/menu.ipxe
@@ -0,0 +1,121 @@
1#!ipxe
2
3:start
4isset ${arch} && goto skip_arch_detect ||
5cpuid --ext 29 && set arch x86_64 || set arch i386
6iseq ${buildarch} arm64 && set arch arm64 ||
7:skip_arch_detect
8chain --autofree boot.cfg ||
9echo Attempting to retrieve latest upstream version number...
10chain --timeout 5000 https://boot.netboot.xyz/version.ipxe ||
11ntp 0.pool.ntp.org ||
12iseq ${cls} serial && goto ignore_cls ||
13set cls:hex 1b:5b:4a # ANSI clear screen sequence - "^[[J"
14set cls ${cls:string}
15:ignore_cls
16
17:version_check
18set latest_version 2.x
19echo ${cls}
20iseq ${version} ${latest_version} && goto version_up2date ||
21echo
22echo Updated version of netboot.xyz is available:
23echo
24echo Running version.....${version}
25echo Updated version.....${latest_version}
26echo
27echo Please download the latest version from netboot.xyz.
28echo
29echo Attempting to chain to latest version...
30chain --autofree http://${boot_domain}/ipxe/${ipxe_disk} ||
31:version_up2date
32
33isset ${menu} && goto ${menu} ||
34isset ${ip} || dhcp
35
36:main_menu
37clear menu
38set space:hex 20:20
39set space ${space:string}
40isset ${next-server} && menu ${site_name} v${version} - next-server: ${next-server} || menu ${site_name}
41item --gap Default:
42item local ${space} Boot from local hdd
43item --gap Distributions:
44iseq ${menu_linux} 1 && item linux ${space} Linux Network Installs (64-bit) ||
45iseq ${menu_linux_i386} 1 && item linux-i386 ${space} Linux Network Installs (32-bit) ||
46iseq ${menu_linux_arm} 1 && item linux-arm ${space} Linux Network Installs (arm64) ||
47iseq ${menu_live} 1 && item live ${space} Live CDs ||
48iseq ${menu_live_arm} 1 && item live-arm ${space} Live CDs ||
49iseq ${menu_bsd} 1 && item bsd ${space} BSD Installs ||
50iseq ${menu_unix} 1 && item unix ${space} Unix Network Installs ||
51iseq ${menu_freedos} 1 && item freedos ${space} FreeDOS ||
52iseq ${menu_windows} 1 && item windows ${space} Windows ||
53item --gap Tools:
54iseq ${menu_utils} 1 && iseq ${platform} efi && item utils-efi ${space} Utilities (UEFI) ||
55iseq ${menu_utils} 1 && iseq ${platform} pcbios && iseq ${arch} x86_64 && item utils-pcbios-64 ${space} Utilities (64-bit) ||
56iseq ${menu_utils} 1 && iseq ${platform} pcbios && iseq ${arch} i386 && item utils-pcbios-32 ${space} Utilities (32-bit) ||
57iseq ${menu_utils_arm} 1 && item utils-arm ${space} Utilities (arm64) ||
58item change_arch ${space} Architecture: ${arch}
59item shell ${space} iPXE shell
60item netinfo ${space} Network card info
61iseq ${menu_pci} 1 && item lspci ${space} PCI Device List ||
62item about ${space} About netboot.xyz
63item --gap Signature Checks:
64item sig_check ${space} netboot.xyz [ enabled: ${sigs_enabled} ]
65isset ${github_user} && item --gap Custom Github Menu: ||
66isset ${github_user} && item custom-github ${space} ${github_user}'s Custom Menu ||
67isset ${custom_url} && item --gap Custom URL Menu: ||
68isset ${custom_url} && item custom-url ${space} Custom URL Menu ||
69isset ${menu} && set timeout 0 || set timeout ${boot_timeout}
70choose --timeout ${timeout} --default ${menu} menu || goto local
71echo ${cls}
72goto ${menu} ||
73iseq ${sigs_enabled} true && goto verify_sigs || goto change_menu
74
75:verify_sigs
76imgverify ${menu}.ipxe ${sigs}${menu}.ipxe.sig || goto error
77goto change_menu
78
79:change_menu
80chain ${menu}.ipxe || goto error
81goto main_menu
82
83:error
84echo Error occurred, press any key to return to menu ...
85prompt
86goto main_menu
87
88:local
89echo Booting from local disks ...
90exit 1
91
92:shell
93echo Type "exit" to return to menu.
94set menu main_menu
95shell
96goto main_menu
97
98:change_arch
99iseq ${arch} x86_64 && set arch i386 && set menu_linux_i386 1 && set menu_linux 0 && goto main_menu ||
100iseq ${arch} i386 && set arch x86_64 && set menu_linux_i386 0 && set menu_linux 1 && goto main_menu ||
101goto main_menu
102
103:sig_check
104iseq ${sigs_enabled} true && set sigs_enabled false || set sigs_enabled true
105goto main_menu
106
107:about
108chain https://boot.netboot.xyz/about.ipxe || chain about.ipxe
109goto main_menu
110
111:custom-github
112chain https://raw.githubusercontent.com/${github_user}/netboot.xyz-custom/master/custom.ipxe || goto error
113goto main_menu
114
115:custom-url
116chain ${custom_url}/custom.ipxe || goto error
117goto main_menu
118
119:custom-user
120chain custom/custom.ipxe
121goto main_menu