copy iPXE NBP to /tftpboot during PXE bootstrap
This allows you to chainload iPXE from a standard PXE environment. As the PXE container already has apache installed, we now have everything we need to support iPXE booting. Change-Id: Ide32dc1910e9f8b3ff875238648726f719e271b2 Implements: blueprint ironic-ipxe
This commit is contained in:
parent
4b9e6d4191
commit
d63930e3dd
@ -1,8 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
|
|
||||||
# of the KOLLA_BOOTSTRAP variable being set, including empty.
|
function prepare_pxe {
|
||||||
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
|
||||||
chown -R ironic: /tftpboot
|
chown -R ironic: /tftpboot
|
||||||
for pxe_file in /var/lib/tftpboot/pxelinux.0 /var/lib/tftpboot/chain.c32 /usr/lib/syslinux/pxelinux.0 \
|
for pxe_file in /var/lib/tftpboot/pxelinux.0 /var/lib/tftpboot/chain.c32 /usr/lib/syslinux/pxelinux.0 \
|
||||||
/usr/lib/syslinux/chain.c32 /usr/lib/PXELINUX/pxelinux.0 \
|
/usr/lib/syslinux/chain.c32 /usr/lib/PXELINUX/pxelinux.0 \
|
||||||
@ -11,6 +10,21 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
|||||||
cp "$pxe_file" /tftpboot
|
cp "$pxe_file" /tftpboot
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
function prepare_ipxe {
|
||||||
|
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
|
||||||
|
cp /usr/lib/ipxe/{undionly.kpxe,ipxe.efi} /tftpboot
|
||||||
|
elif [[ "${KOLLA_BASE_DISTRO}" =~ centos|oraclelinux|rhel ]]; then
|
||||||
|
cp /usr/share/ipxe/{undionly.kpxe,ipxe.efi} /tftpboot
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
|
||||||
|
# of the KOLLA_BOOTSTRAP variable being set, including empty.
|
||||||
|
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
||||||
|
prepare_pxe
|
||||||
|
prepare_ipxe
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- Copy iPXE images to TFTP root during ironic_pxe bootstrap. This
|
||||||
|
allows you to chainload iPXE from a PXE environment.
|
Loading…
Reference in New Issue
Block a user