forked from netbootxyz/netboot.xyz-custom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustom.ipxe
81 lines (71 loc) · 1.97 KB
/
custom.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
#!ipxe
# CentOS Operating System
# http://www.centos.org
goto ${menu} ||
:customcentos
clear osversion
set os UnixHeads CentOS
set mirror centos.unixheads.org
set ksdevice eth0
menu ${os} - ${arch} - Image Sig Checks: [${img_sigs_enabled}]
item 7.3.1611 ${os} 7.3
item 7.2.1511 ${os} 7.2
item 6.8 ${os} 6.8
isset ${osversion} || choose osversion || goto linux_menu
echo ${cls}
iseq ${osversion} 6.8 && set dir ${menu}/${osversion}/os/${arch} ||
set dir ${osversion}/os/x86_64
set repo http://${mirror}/${dir}
goto boottype
:boottype
set ova ${os} ${osversion}
menu ${os} ${arch} boot type
item graphical ${ova} graphical installer
item text ${ova} text based installer
item rescue ${ova} rescue
item kickstart ${ova} set kickstart url [ ${ksurl} ]
item kickstart_device ${ova} set ksdevice [ ${ksdevice} ]
isset ${bt} || choose bt || goto centos
echo ${cls}
iseq ${bt} text && goto text ||
iseq ${bt} rescue && goto rescue ||
iseq ${bt} kickstart && goto kickstart ||
iseq ${bt} kickstart_device && goto kickstart_device ||
goto bootos_images
:text
set params text ||
goto bootos_images
:rescue
set params rescue ||
goto bootos_images
:kickstart
echo -n Specify kickstart URL for ${os} ${osversion}: && read ksurl
set params ks=${ksurl} ksdevice=${ksdevice} ||
clear bt
goto boottype
:kickstart_device
echo -n Specify ksdevice param for ${os} ${osversion}: && read ksdevice
set ksdevice ${ksdevice} ||
clear bt
goto boottype
:bootos_images
imgfree
kernel http://${mirror}/${dir}/images/pxeboot/vmlinuz repo=${repo} ${params} ${netcfg} ${console}
initrd http://${mirror}/${dir}/images/pxeboot/initrd.img
echo
echo MD5sums:
md5sum vmlinuz initrd.img
iseq ${img_sigs_enabled} true && goto verify_sigs || goto skip_sigs
:verify_sigs
echo
echo Checking signatures...
imgverify vmlinuz ${sigs}${dir}/images/pxeboot/vmlinuz.sig || goto error
imgverify initrd.img ${sigs}${dir}/images/pxeboot/initrd.img.sig || goto error
echo Signatures verified!
echo
:skip_sigs
boot
goto linux_menu
:linux_menu
clear menu
exit 0