-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwindows.ipxe
More file actions
61 lines (52 loc) · 1.81 KB
/
windows.ipxe
File metadata and controls
61 lines (52 loc) · 1.81 KB
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
#!ipxe
# Microsoft Windows
# https://www.microsoft.com
iseq ${arch} x86_64 && set win_arch x64 ||
iseq ${arch} i386 && set win_arch x86 ||
goto ${menu} ||
:windows
set os Microsoft Windows
clear win_version
menu ${os}
item --gap Installers
item win_install ${space} Load ${os} Installer...
item --gap Options:
item arch_set ${space} Architecture [ ${win_arch} ]
item dir_set ${space} Base URL [ http://${boot_domain}/${win_dir} ]
choose win_version || goto windows_exit
goto ${win_version}
:arch_set
iseq ${win_arch} x64 && set win_arch x86 || set win_arch x64
goto windows
:dir_set
echo Set the path of an extracted Windows ISO without the trailing slash:
echo e.g. windows/winpe/win10
echo
echo -n LOCATION: ${} && read win_dir
echo
echo netboot.lan will attempt to load the following files:
echo http://${boot_domain}/${win_dir}/${win_arch}/bootmgr
echo http://${boot_domain}/${win_dir}/${win_arch}/boot/bcd
echo http://${boot_domain}/${win_dir}/${win_arch}/boot/boot.sdi
echo http://${boot_domain}/${win_dir}/${win_arch}/sources/boot.wim
echo
prompt Press any key to return to Windows Menu...
goto windows
:win_install
isset http://${boot_domain}/${win_dir} && goto boot || echo URL not set... && goto dir_set
:boot
iseq ${win_arch} x64 && kernel http://${boot_domain}/wimboot ||
iseq ${win_arch} x86 && kernel http://${boot_domain}/wimboot.i386 ||
initrd http://${boot_domain}/${win_dir}/${win_arch}/bootmgr bootmgr
initrd http://${boot_domain}/${win_dir}/${win_arch}/boot/bcd bcd
initrd http://${boot_domain}/${win_dir}/${win_arch}/boot/boot.sdi boot.sdi
initrd http://${boot_domain}/${win_dir}/${win_arch}/sources/boot.wim boot.wim
iseq ${img_sigs_enabled} true && goto verify_sigs || goto skip_sigs
:verify_sigs
echo
echo Checking wimboot signature...
imgverify wimboot ${sigs}wimboot.sig || goto error
:skip_sigs
boot
:windows_exit
exit 0