Skip to content

Commit 42c16a4

Browse files
Merge pull request #639 from steveb/centos10
Changes for running ironic-conductor on CentOS10
2 parents 1efd0f6 + eae95fc commit 42c16a4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

templates/common/bin/pxe-init.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ fi
3737
for dir in httpboot tftpboot; do
3838
cp /usr/share/ipxe/ipxe-snponly-x86_64.efi /var/lib/ironic/$dir/snponly.efi
3939
cp /usr/share/ipxe/undionly.kpxe /var/lib/ironic/$dir/undionly.kpxe
40-
cp /usr/share/ipxe/ipxe.lkrn /var/lib/ironic/$dir/ipxe.lkrn
40+
# ipxe.lkrn is not packaged in RHEL 10
41+
if [ -f "/usr/share/ipxe/ipxe.lkrn" ]; then
42+
cp /usr/share/ipxe/ipxe.lkrn /var/lib/ironic/$dir/ipxe.lkrn
43+
fi
4144
cp /boot/efi/EFI/$efi_dir/shimx64.efi /var/lib/ironic/$dir/bootx64.efi
4245
cp /boot/efi/EFI/$efi_dir/grubx64.efi /var/lib/ironic/$dir/grubx64.efi
4346
# Ensure all files are readable
@@ -60,14 +63,16 @@ if [ -f "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem" ] && [ -f "/var/lib/
6063
# Repack the initramfs
6164
pushd initramfs
6265
find . | cpio -o -c --quiet -R root:root | gzip -1 > /var/lib/ironic/httpboot/ironic-python-agent.initramfs
66+
popd
67+
rm -rf /initramfs
6368
fi
6469

6570
# Build an ESP image
6671
pushd /var/lib/ironic/httpboot
6772
if ! command -v dd || ! command -v mkfs.msdos || ! command -v mmd; then
6873
echo "WARNING: esp.img will not be created because dd/mkfs.msdos/mmd are missing. Please patch the OpenstackVersion to update container images."
6974
elif [ ! -a "esp.img" ]; then
70-
dd if=/dev/zero of=esp.img bs=4096 count=1024
75+
dd if=/dev/zero of=esp.img bs=4096 count=2048
7176
mkfs.msdos -F 12 -n 'ESP_IMAGE' esp.img
7277

7378
mmd -i esp.img EFI

0 commit comments

Comments
 (0)