1+ #!ipxe
2+
3+ # Red Hat Enterprise Linux CoreOS (RHCOS)
4+ # https://openshift.com
5+ # https://github.com/coreos/coreos-installer/blob/master/README.md#installing-from-pxe
6+
7+ goto ${menu}
8+
9+ :rhcos
10+ set os {{ releases.rhcos.name }}
11+ set os_arch ${arch}
12+ iseq ${os_arch} x86_64 && set os_arch x86_64 ||
13+ iseq ${os_arch} arm64 && set os_arch aarch64 ||
14+ isset ${rhcos_base_url} || set rhcos_base_url https://mirror.openshift.com/pub/openshift-v4
15+ isset ${install_device} || set install_device /dev/sda
16+ isset ${ignition_url} || set ignition_url skip
17+ menu ${os} - ${os_arch}
18+ item --gap ${os}:
19+ {% for item in releases .rhcos .versions %}
20+ item {{ item.code_name }} ${space} ${os} {{ item.name }}
21+ {% endfor %}
22+ item url_set ${space} Set Base URL: ${rhcos_base_url}
23+ item install_dev ${space} Set install device: ${install_device}
24+ item ignition_config ${space} Set ignition config url: ${ignition_url}
25+ choose --default ${rhcos_version} rhcos_version || goto rhcos_exit
26+ echo ${cls}
27+ iseq ${rhcos_version} url_set && goto url_set ||
28+ iseq ${rhcos_version} ignition_config && goto ignition_config ||
29+ iseq ${rhcos_version} install_dev && goto install_dev ||
30+ goto rhcos_boot ||
31+ goto rhcos_exit
32+
33+ :rhcos_boot
34+ {% for item in releases .rhcos .versions %}
35+ iseq ${core_version} {{ item.code_name }} ||
36+ {% endfor %}
37+ set base_url ${rhcos_base_url}/${os_arch}/dependencies/rhcos
38+ set build_version ${rhcos_version}
39+ imgfree
40+ kernel ${base_url}/${build_version}/latest/rhcos-live-kernel.${os_arch} ip=dhcp rd.neednet=1 coreos.inst.install_dev=${install_device} coreos.inst.ignition_url=${ignition_url} coreos.live.rootfs_url=${base_url}/${build_version}/latest/rhcos-live-rootfs.${os_arch}.img initrd=initrd.magic ${cmdline}
41+ initrd ${base_url}/${build_version}/latest/rhcos-live-initramfs.${os_arch}.img
42+ boot
43+ goto rhcos_exit
44+
45+ :url_set
46+ echo Set the HTTPS URL of the OpenShift Mirror without the trailing slash:
47+ echo e.g. https://mirror.mydomain.com/pub/openshift-v4
48+ echo
49+ echo -n Please set desired Base URL: && read rhcos_base_url
50+ clear menu
51+ goto rhcos
52+
53+ :install_dev
54+ echo -n Please set desired install device: && read install_device
55+ clear menu
56+ goto rhcos
57+
58+ :ignition_config
59+ echo -n Please set Ignition Configuration URL: && read ignition_url
60+ clear menu
61+ goto rhcos
62+
63+ :rhcos_exit
64+ clear menu
65+ exit 0
0 commit comments