forked from netbootxyz/netboot.xyz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
debian.ipxe
97 lines (83 loc) · 2.62 KB
/
debian.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
#!ipxe
# Debian Operating System
# http://www.debian.org
goto ${menu}
:debian
set os Debian
clear debian_version
clear older_release
menu ${os} - ${arch_a} - Image Sig Checks: [${img_sigs_enabled}]
item --gap Latest Releases
item stretch ${space} ${os} 9.0 (stretch)
item jessie ${space} ${os} 8.0 (jessie)
item wheezy ${space} ${os} 7.0 (wheezy)
item --gap Testing Releases
item buster ${space} ${os} buster (testing)
item sid ${space} ${os} sid (unstable)
item --gap Older Releases
item older_release ${space} Set release codename...
choose debian_version || goto debian_exit
iseq ${debian_version} older_release && goto older_release ||
goto mirrorcfg
:older_release
set older_release true
set debian_mirror archive.debian.org
echo Setting mirror to ${debian_mirror}
clear debian_version
echo -n Please set enter code name of release: ${} && read debian_version
set dir ${debian_base_dir}/dists/${debian_version}/main/installer-${arch_a}/current/images/netboot/
goto deb_boot_type
:mirrorcfg
set mirrorcfg mirror/suite=${debian_version}
set dir ${debian_base_dir}/dists/${debian_version}/main/installer-${arch_a}/current/images/netboot/
goto deb_boot_type
:deb_boot_type
menu ${os} [${debian_version}] Installer
item --gap Install types
item text ${space} Text Based Install
item graphical ${space} Graphical Based Install
item rescue ${space} Rescue Mode
item expert ${space} Expert Install
item preseed ${space} Specify preseed url...
choose --default ${type} type || goto debian
echo ${cls}
goto deb_${type}
:deb_rescue
set install_params rescue/enable=true
goto deb_text
:deb_expert
set install_params priority=low
goto deb_text
:deb_preseed
echo -n Specify preseed URL for ${os} ${debian_version}: && read preseedurl
set install_params auto=true priority=critical preseed/url=${preseedurl}
goto deb_text
:deb_text
set dir ${dir}${menu}-installer/${arch_a}
goto deb_boot
:deb_graphical
set dir ${dir}gtk/${menu}-installer/${arch_a}
set install_params vga=788
goto deb_boot
:deb_boot
imgfree
echo Boot parameters: ${install_params} -- quiet ${params}
kernel http://${debian_mirror}/${dir}/linux ${install_params} ${netcfg} ${mirrorcfg} ${console} -- quiet ${params} initrd=initrd.gz
initrd http://${debian_mirror}/${dir}/initrd.gz
echo
echo MD5sums:
md5sum linux initrd.gz
iseq ${img_sigs_enabled} true && iseq ${older_release} true && goto skip_sigs ||
iseq ${img_sigs_enabled} true && goto verify_sigs || goto skip_sigs
:verify_sigs
echo
echo Checking signatures...
imgverify linux ${sigs}${dir}/linux.sig || goto error
imgverify initrd.gz ${sigs}${dir}/initrd.gz.sig || goto error
echo Signatures verified!
echo
:skip_sigs
boot
:debian_exit
clear menu
exit 0