This directory contains tools for building customized iPXE images for network booting OpenShift nodes in HotStack scenarios.
Pre-built iPXE images are available from GitHub releases:
# Download BIOS boot image
curl -L -O https://github.com/openstack-k8s-operators/hotstack/releases/download/latest-ipxe/ipxe-bios-latest.img
# Download UEFI boot image
curl -L -O https://github.com/openstack-k8s-operators/hotstack/releases/download/latest-ipxe/ipxe-efi-latest.imgFor specific versions, see the releases page.
-
Upload the USB boot image for OCP nodes:
Use
ipxe-boot-usb.rawif built locally, oripxe-bios-latest.imgif downloaded.openstack image create --disk-format=raw --file ipxe-bios-latest.img ipxe-boot-usb \ --property os_shutdown_timeout=5 \ --public
-
Upload images for sushy-emulator rescue mode net-boot:
UEFI boot image (use
efi.imgif built locally, oripxe-efi-latest.imgif downloaded from GitHub):openstack image create --disk-format=raw --file ipxe-efi-latest.img ipxe-rescue-uefi \ --property os_shutdown_timeout=5 \ --property hw_firmware_type=uefi \ --property hw_machine_type=q35 \ --property hw_rescue_device=cdrom \ --property hw_rescue_bus=usb \ --public
BIOS boot image (use
ipxe-boot-usb.rawif built locally, oripxe-bios-latest.imgif downloaded):openstack image create --disk-format=raw --file ipxe-bios-latest.img ipxe-rescue-bios \ --property os_shutdown_timeout=5 \ --property hw_rescue_device=cdrom \ --property hw_rescue_bus=usb \ --public
The following sections describe how to build iPXE images locally using the
included Makefile. The Makefile automates the process of building customized
iPXE images for different use cases, such as booting from USB, ISO, or EFI. It
allows for custom configuration of iPXE by embedding a custom script
(script.ipxe) and copying local configuration headers from ipxe-config/
into the iPXE source directory.
To build the iPXE images, you need to install the following dependencies:
gcc- For compiling iPXEmake- Build systemperl- Required by iPXE build scriptsgit- To clone the iPXE repositoryguestfs-tools(providesvirt-make-fs) - For creating the EFI FAT filesystem image
On Fedora/RHEL/CentOS:
sudo dnf install -y gcc make perl git guestfs-toolsOn Ubuntu/Debian:
sudo apt-get install -y gcc make perl git libguestfs-toolsIPXE_SRCDIR: The directory containing the iPXE source code.IPXE_USB,IPXE_EFI: The specific iPXE images to use as the boot image for USB and EFI formats.ipxe_usb_path,ipxe_efi_path: The paths to the iPXE images in the source directory.
all: The default target that builds both image formats (efi.img and ipxe-boot-usb.raw).efi.img: Creates an EFI image by copying the iPXE EFI binary to a FAT filesystem and creating a raw image.ipxe-boot-usb.raw: Simply copies the iPXE USB image to a raw file.clean: Removes all generated files and the iPXE source code directory.
-
Build all iPXE images:
make
-
To build a specific image, use:
make efi.img make ipxe-boot-usb.raw