From c8c75e81b5516e4e7ba0825de8fd6f111de08330 Mon Sep 17 00:00:00 2001 From: Bin Qian Date: Wed, 15 Dec 2021 12:24:32 -0500 Subject: [PATCH] relocate /pxeboot to /var/pxeboot Relocate writable /pexboot dir to /var/pxeboot Story: 2009101 Task: 44197 TCs will be list https://review.opendev.org/c/starlingx/metal/+/822008. Depends-on: https://review.opendev.org/c/starlingx/metal/+/822008 Change-Id: I239846d57b9b6e4f0a49af33a268e2f0943e90f5 Signed-off-by: Bin Qian --- build-tools/build-iso | 12 ++++++------ build-tools/patch-iso | 36 ++++++++++++++++++------------------ 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/build-tools/build-iso b/build-tools/build-iso index 5a269365..1ff2210a 100755 --- a/build-tools/build-iso +++ b/build-tools/build-iso @@ -613,9 +613,9 @@ EOM \mkdir -p $OUTPUT_DIST_DIR/isolinux/pxeboot/EFI/centos/x86_64-efi - \cp --preserve=all pxeboot/pxelinux.0 pxeboot/menu.c32 pxeboot/chain.c32 $OUTPUT_DIST_DIR/isolinux/pxeboot && + \cp --preserve=all var/pxeboot/pxelinux.0 var/pxeboot/menu.c32 var/pxeboot/chain.c32 $OUTPUT_DIST_DIR/isolinux/pxeboot && \cp --preserve=all usr/lib/grub/x86_64-efi/* $OUTPUT_DIST_DIR/isolinux/pxeboot/EFI/centos/x86_64-efi/ && - \cp --preserve=all pxeboot/EFI/grubx64.efi $OUTPUT_DIST_DIR/isolinux/pxeboot/EFI/ + \cp --preserve=all var/pxeboot/EFI/grubx64.efi $OUTPUT_DIST_DIR/isolinux/pxeboot/EFI/ if [ $? -ne 0 ]; then echo "Error: Could not copy all files from installer" exit 1 @@ -634,13 +634,13 @@ EOM $OUTPUT_DIST_DIR/isolinux/images/pxeboot/vmlinuz \ $OUTPUT_DIST_DIR/isolinux/initrd.img \ $OUTPUT_DIST_DIR/isolinux/images/pxeboot/initrd.img - \cp --preserve=all pxeboot/rel-*/installer-bzImage_1.0 \ + \cp --preserve=all var/pxeboot/rel-*/installer-bzImage_1.0 \ $OUTPUT_DIST_DIR/isolinux/vmlinuz && - \cp --preserve=all pxeboot/rel-*/installer-bzImage_1.0 \ + \cp --preserve=all var/pxeboot/rel-*/installer-bzImage_1.0 \ $OUTPUT_DIST_DIR/isolinux/images/pxeboot/vmlinuz && - \cp --preserve=all pxeboot/rel-*/installer-intel-x86-64-initrd_1.0 \ + \cp --preserve=all var/pxeboot/rel-*/installer-intel-x86-64-initrd_1.0 \ $OUTPUT_DIST_DIR/isolinux/initrd.img && - \cp --preserve=all pxeboot/rel-*/installer-intel-x86-64-initrd_1.0 \ + \cp --preserve=all var/pxeboot/rel-*/installer-intel-x86-64-initrd_1.0 \ $OUTPUT_DIST_DIR/isolinux/images/pxeboot/initrd.img if [ $? -ne 0 ]; then diff --git a/build-tools/patch-iso b/build-tools/patch-iso index b5e4b04b..6413b2f7 100755 --- a/build-tools/patch-iso +++ b/build-tools/patch-iso @@ -273,10 +273,10 @@ fi extract_pkg_from_patch_repo platform-kickstarts-pxeboot if [ $? -eq 0 ]; then # Replace files - \rm -f ${BUILDDIR}/pxeboot/pxeboot_controller.cfg \ - ${BUILDDIR}/pxeboot/pxeboot_smallsystem.cfg \ - ${BUILDDIR}/pxeboot/pxeboot_smallsystem_lowlatency.cfg && - \cp --preserve=all pxeboot/* ${BUILDDIR}/pxeboot/ + \rm -f ${BUILDDIR}/var/pxeboot/pxeboot_controller.cfg \ + ${BUILDDIR}/var/pxeboot/pxeboot_smallsystem.cfg \ + ${BUILDDIR}/var/pxeboot/pxeboot_smallsystem_lowlatency.cfg && + \cp --preserve=all pxeboot/* ${BUILDDIR}/var/pxeboot/ if [ $? -ne 0 ]; then echo "Failed to copy extracted pxeboot kickstarts" exit 1 @@ -290,10 +290,10 @@ fi extract_pkg_from_patch_repo pxe-network-installer if [ $? -eq 0 ]; then # Replace files - \rm -f ${BUILDDIR}/pxeboot/pxelinux.0 \ - ${BUILDDIR}/pxeboot/menu.c32 \ - ${BUILDDIR}/pxeboot/chain.c32 && - \cp --preserve=all pxeboot/pxelinux.0 pxeboot/menu.c32 pxeboot/chain.c32 ${BUILDDIR}/pxeboot/ + \rm -f ${BUILDDIR}/var/pxeboot/pxelinux.0 \ + ${BUILDDIR}/var/pxeboot/menu.c32 \ + ${BUILDDIR}/var/pxeboot/chain.c32 && + \cp --preserve=all pxeboot/pxelinux.0 pxeboot/menu.c32 pxeboot/chain.c32 ${BUILDDIR}/var/pxeboot/ if [ $? -ne 0 ]; then echo "Error: Could not copy all files from installer" exit 1 @@ -309,17 +309,17 @@ if [ $? -eq 0 ]; then # Replace vmlinuz and initrd.img with our own pre-built ones \rm -f \ ${BUILDDIR}/vmlinuz \ - ${BUILDDIR}/images/pxeboot/vmlinuz \ + ${BUILDDIR}/images/var/pxeboot/vmlinuz \ ${BUILDDIR}/initrd.img \ - ${BUILDDIR}/images/pxeboot/initrd.img && + ${BUILDDIR}/images/var/pxeboot/initrd.img && \cp --preserve=all pxeboot/rel-*/installer-bzImage_1.0 \ ${BUILDDIR}/vmlinuz && \cp --preserve=all pxeboot/rel-*/installer-bzImage_1.0 \ - ${BUILDDIR}/images/pxeboot/vmlinuz && + ${BUILDDIR}/images/var/pxeboot/vmlinuz && \cp --preserve=all pxeboot/rel-*/installer-intel-x86-64-initrd_1.0 \ ${BUILDDIR}/initrd.img && \cp --preserve=all pxeboot/rel-*/installer-intel-x86-64-initrd_1.0 \ - ${BUILDDIR}/images/pxeboot/initrd.img + ${BUILDDIR}/images/var/pxeboot/initrd.img if [ $? -ne 0 ]; then echo "Error: Failed to copy installer images" exit 1 @@ -333,8 +333,8 @@ fi extract_pkg_from_patch_repo grub2-efi-x64-pxeboot if [ $? -eq 0 ]; then # Replace files - \rm -f ${BUILDDIR}/pxeboot/EFI/grubx64.efi && - \cp --preserve=all pxeboot/EFI/grubx64.efi ${BUILDDIR}/pxeboot/EFI/ + \rm -f ${BUILDDIR}/var/pxeboot/EFI/grubx64.efi && + \cp --preserve=all pxeboot/EFI/grubx64.efi ${BUILDDIR}/var/pxeboot/EFI/ if [ $? -ne 0 ]; then echo "Error: Failed to copy grub2-efi-x64-pxeboot files" exit 1 @@ -350,8 +350,8 @@ if [ $? -eq 0 ]; then # Replace files for f in usr/lib/grub/x86_64-efi/*; do f_base=$(basename $f) - \rm -f ${BUILDDIR}/pxeboot/EFI/$f_base && - \cp --preserve=all ${f} ${BUILDDIR}/pxeboot/EFI/ + \rm -f ${BUILDDIR}/var/pxeboot/EFI/$f_base && + \cp --preserve=all ${f} ${BUILDDIR}/var/pxeboot/EFI/ if [ $? -ne 0 ]; then echo "Error: Failed to copy grub2-common files" exit 1 @@ -368,8 +368,8 @@ if [ $? -eq 0 ]; then # Replace files for f in usr/lib/grub/x86_64-efi/*; do f_base=$(basename $f) - \rm -f ${BUILDDIR}/pxeboot/EFI/$f_base && - \cp --preserve=all ${f} ${BUILDDIR}/pxeboot/EFI/ + \rm -f ${BUILDDIR}/var/pxeboot/EFI/$f_base && + \cp --preserve=all ${f} ${BUILDDIR}/var/pxeboot/EFI/ if [ $? -ne 0 ]; then echo "Error: Failed to copy grub2-efi-x64-modules files" exit 1