-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmenu.ipxe
92 lines (80 loc) · 2.25 KB
/
menu.ipxe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!ipxe
:start
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
chain --autofree global.cfg ||
ntp time.osuosl.org ||
iseq ${cls} serial && goto ignore_cls ||
set cls:hex 1b:5b:4a # ANSI clear screen sequence - "^[[J"
set cls ${cls:string}
:ignore_cls
:version_check
set latest_version 1.21.1+ (g27398)
echo ${cls}
iseq ${version} ${latest_version} && goto version_up2date ||
echo
echo Updated version of OSUOSL iPXE is available:
echo
echo Running version.....${version}
echo Updated version.....${latest_version}
echo
echo Attempting to chain to latest version...
chain --autofree http://${boot_domain}/tftpboot/${ipxe_disk} ||
:version_up2date
isset ${menu} && goto ${menu} ||
isset ${ip} || dhcp
:main_menu
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} v${version} - next-server: ${next-server}
item --gap Default:
item local ${space} Boot from local hdd
item --gap Distributions:
item almalinux ${space} Install AlmaLinux
item debian ${space} Install Debian
item --gap Tools:
item cmdline ${space} Kernel cmdline params: [${cmdline}]
item shell ${space} iPXE shell
item netinfo ${space} Network card info
item firmware ${space} Firmware Image
item netboot_xyz ${space} Boot from netboot.xyz
item reboot ${space} Reboot machine
isset ${menu} && set timeout 0 || set timeout 60000
choose --timeout ${timeout} --default local menu || goto change_menu
echo ${cls}
goto ${menu} ||
goto change_menu
:change_menu
chain ${menu}.ipxe || goto error
goto main_menu
:cmdline
echo If you want to change the default kernel command line parameters
echo you can override the defaults here.
echo
echo Currently set to: ${cmdline}
echo
echo -n Enter cmdline parameters: ${} && read cmdline
goto main_menu
:error
echo Error occured, press any key to return to menu ...
prompt
goto main_menu
:netboot_xyz
echo Booting from boot.netboot.xyz
chain --autofree https://boot.netboot.xyz || goto main_menu
:local
echo Booting from local disks ...
sanboot --no-describe --drive 0x80
:shell
echo Type "exit" to return to menu.
set menu main_menu
shell
goto main_menu
:reboot
echo Rebooting machine
reboot
exit 1