From adef5d60a78e3dc979bb92f6dc96b8983eb692ba Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Fri, 29 Mar 2024 14:22:53 -0700 Subject: [PATCH] CI: Unpack cirros image partition jobs Cirros, by default, as part of its initialization, copies the initial ramdisk contents over the filesystem on disk. This changes the partition image creation job so we do it upfront so the partition image looks like and matches what we generally expect from a partition image as opposed to just a kernel, ramdisk, and bootloader. Change-Id: Idde30e33e9453f8564a7c3b9109c4e567146dee7 --- devstack/tools/ironic/scripts/cirros-partition.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/devstack/tools/ironic/scripts/cirros-partition.sh b/devstack/tools/ironic/scripts/cirros-partition.sh index 38e1764c4b..bf6168e827 100755 --- a/devstack/tools/ironic/scripts/cirros-partition.sh +++ b/devstack/tools/ironic/scripts/cirros-partition.sh @@ -54,6 +54,11 @@ sudo mount $efidev $efi_mp sudo cp -aR $root_mp/* $dest/ sudo cp -aR $efi_mp/EFI $dest/boot/efi/ +# Extract all of the stuffs from the disk image and write it out into +# the dest folder. This is *normally* done on startup for Cirros, but +# doesn't quite jive with the expected partition image model. +sudo zcat $root_mp/boot/initrd.img* | sudo cpio -i --make-directories -D $dest + # These locations are required by IPA even when it does not really run # grub-install. sudo mkdir -p $dest/{dev,proc,run,sys}