-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathmenu.ipxe
197 lines (170 loc) · 6.07 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
#!ipxe
# Variables are specified in boot.ipxe.cfg
# Some menu defaults
set menu-timeout 5000
set submenu-timeout ${menu-timeout}
isset ${menu-default} || set menu-default exit
set esc:hex 1b
set bold ${esc:string}[1m
set orange ${esc:string}[33;0m
set yellow ${esc:string}[33;1m
set cyan ${esc:string}[36;1m
set resetfg ${esc:string}[39m
set resetbg ${esc:string}[49m
set resetbold ${esc:string}[22m
set reset ${esc:string}[0m
# Figure out if client is 64-bit capable
cpuid --ext 29 && set arch x86_64 || set arch x86
cpuid --ext 29 && set archb 64 || set archb 32
cpuid --ext 29 && set archl x86_64 || set archl i386
# Set graphics mode and configure colours
console --x 800 --y 600 --picture riddick.png
colour --basic 3 --rgb 0xffaa44 3
cpair --foreground 0 --background 3 2
cpair --foreground 3 3
set chotkey ${bold}
set cname ${orange}
###################### MAIN MENU ####################################
:start
menu iPXE boot menu for ${manufacturer} ${product} (${archb}bit)
item --gap RECOVERY / HDD-TOOLS
item --key s srcd ${chotkey}S${resetbold}ystem Rescue CD
item srcda System Rescue CD (alt. Kernel)
item --key d dfsee ${chotkey}D${resetbold}FSee
item --key l clonez C${chotkey}l${resetbold}onezilla
item --key g gparted ${chotkey}G${resetbold}Parted Live
item g4u g4u (ghosting for unix)
item g4l G4L - Ghost for Linux (kernel 4x2.8)
item
item --gap ANTIVIRUS
item avg AVG Rescue CD
item --key b bitdef ${chotkey}B${resetbold}itDefender Rescue CD
item --key f fsecure ${chotkey}F${resetbold}-Secure Rescue CD
item
item --gap MISCELLANEOUS
item --key h hdt ${chotkey}H${resetbold}ardware Detection Tool
item mt6 Memtest86 V6
item mt86p Memtest86+ V5
item
item --gap ADVANCED OPTIONS
item --key c config ${chotkey}C${resetbold}onfigure settings
item shell Drop to iPXE shell
item reboot Reboot computer
item
item --key x exit E${chotkey}x${resetbold}it iPXE and continue BIOS boot
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
:exit
exit
:config
config
goto start
:back
set submenu-timeout 0
clear submenu-default
goto start
############ MAIN MENU ITEMS ############
:srcd
echo Booting ${cname}SystemRescueCD${reset} (${archb})
set base-url http://diskstation:80/ipxe/sysresccd/
kernel ${base-url}isolinux/rescue${archb}
initrd ${base-url}isolinux/initram.igz
imgargs rescue${archb} setkmap=de dodhcp netboot=${base-url}sysrcd.dat
boot || goto failed
goto start
:srcda
echo Booting ${cname}SystemRescueCD with alt. Kernel${reset} (${archb})
set base-url http://diskstation:80/ipxe/sysresccd/
kernel ${base-url}isolinux/altker${archb}
initrd ${base-url}isolinux/initram.igz
imgargs altker${archb} setkmap=de dodhcp netboot=${base-url}sysrcd.dat
boot || goto failed
goto start
:dfsee
echo Booting ${cname}DFSee${reset}
kernel ${boot-url}memdisk iso raw
initrd ${boot-url}dfsee/dfsee.iso
boot || goto failed
#sanboot --no-describe --drive 0x00 ${sanboot-url}dfsee/dfsee.iso
goto start
:hdt
# http://hdt-project.org/
echo Booting ${cname}Hardware Detection Tool${reset}
sanboot --no-describe --drive 0x00 ${sanboot-url}hdt/hdt.img || goto failed
goto start
:mt6
echo Booting ${cname}Memtest86 V6${reset}
kernel ${boot-url}memdisk
initrd ${boot-url}memtest86-6/memtest86-usb.img
boot || goto failed
#sanboot --no-describe --drive 0x00 ${sanboot-url}memtest86-6/memtest86-usb.img
goto start
:mt86p
echo Booting ${cname}Memtest86+ V5${reset}
boot ${boot-url}memtest86+/memtest86+.bin || goto failed
goto start
:fsecure
echo Booting ${cname}F-Secure Rescue CD${reset}
set base-url ${boot-url}fsecure/
kernel ${base-url}linux ramdisk_size=100000 lang=en vt.default_utf8=0 apm=power-off vga=normal nomce loglevel=1 nolapic_timer nosound console=tty10 video=noblank
initrd ${base-url}minirt.gz
boot || goto failed
goto start
:clonez
echo Booting ${cname}Clonezilla${reset} (${arch})
set base-url ${boot-url}clonezilla/${arch}/
kernel ${base-url}vmlinuz boot=live union=overlay username=user config components noswap edd=on nomodeset nodmraid noeject locales= keyboard-layouts= ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch=no vga=normal net.ifnames=0 nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 fetch=${base-url}filesystem.squashfs
initrd ${base-url}initrd.img
boot || goto failed
goto start
:gparted
echo Booting ${cname}GParted Live${reset} (${arch})
set base-url ${boot-url}gparted/${arch}/
kernel ${base-url}vmlinuz boot=live union=overlay username=user config components noswap noeject ip= net.ifnames=0 nosplash fetch=${base-url}filesystem.squashfs
initrd ${base-url}initrd.img
boot || goto failed
goto start
:g4u
echo Booting ${cname}g4u - ghosting for unix${reset}
set base-url ${boot-url}g4u/
#kernel ${base-url}netbsd
#initrd ${base-url}miniroot.kmod
kernel ${boot-url}memdisk iso raw
initrd ${base-url}g4u-2.5.iso
boot || goto failed
goto start
:g4l
echo Booting ${cname}G4L - Ghost for Linux${reset}
set base-url ${boot-url}g4l/
kernel ${base-url}bz4x2.8
initrd ${base-url}ramdisk.lzma
boot || goto failed
goto start
:bitdef
echo Booting ${cname}BitDefender Rescue CD${reset} (${archl})
set base-url ${boot-url}bitdefender/
kernel ${base-url}kernel.${archl} root=/dev/nfs real_root=/dev/nfs nfsroot=172.16.254.1:/volume1/web/ipxe/bitdefender/cd/ ip=${ip} loop=/rescue/livecd.squashfs looptype=squashfs livecd.nfsif=${mac} initrd udev cdroot nosplash lang=en
initrd ${base-url}initfs.${archl}
boot || goto failed
goto start
:avg
echo Booting ${cname}AVG Rescue CD${reset}
set base-url ${boot-url}avg/
kernel ${base-url}vmlinuz max_loop=255 init=linuxrc vga=ask reboot=bios
initrd ${base-url}initrd.lzm
boot || goto failed
goto start