relocate /pxeboot to /var/pxeboot

Relocate writable /pxeboot dir to /var/pxeboot
TCs:
  - Provisioned AIO-DX
  - Provisioned Standard (2 controllers + 3 computes)
  - Sanity tests
  - Controller reinstall
  - Upgrade from previous release

Change-Id: I8f0c32d65b0e9fa95b484d389b34b71c922bfb16
Story: 2009101
Task: 44201
Signed-off-by: Bin Qian <bin.qian@windriver.com>
This commit is contained in:
Bin Qian 2021-10-04 14:51:28 -04:00
parent 62b4c3aa1c
commit ed93dd4039
3 changed files with 40 additions and 40 deletions

View File

@ -69,9 +69,9 @@ if [ ! -z "$OTHER_REL_DIR" ]; then
cp -r $TMP_RPM/usr / \
|| report_post_failure_with_msg "Failed to copy pxe-network-installer /usr"
cp -r $TMP_RPM/pxeboot/$OTHER_REL_DIR /pxeboot/ \
|| report_post_failure_with_msg "Failed to copy pxe-network-installer /pxeboot/$OTHER_REL_DIR"
cp $TMP_RPM/pxeboot/pxelinux.cfg.files/*-$OTHER_REL_VERSION /pxeboot/pxelinux.cfg.files/ \
cp -r $TMP_RPM/pxeboot/$OTHER_REL_DIR /var/pxeboot/ \
|| report_post_failure_with_msg "Failed to copy pxe-network-installer /var/pxeboot/$OTHER_REL_DIR"
cp $TMP_RPM/pxeboot/pxelinux.cfg.files/*-$OTHER_REL_VERSION /var/pxeboot/pxelinux.cfg.files/ \
|| report_post_failure_with_msg "Failed to copy pxe-network-installer pxelinux.cfg files"
rm -rf $TMP_RPM

View File

@ -49,19 +49,19 @@ StarlingX Network Installation
%defattr(-,root,root,-)
%install
install -v -d -m 755 %{buildroot}/pxeboot
install -v -d -m 755 %{buildroot}/pxeboot/pxelinux.cfg.files
install -v -d -m 755 %{buildroot}/pxeboot/rel-%{platform_release}
install -v -d -m 755 %{buildroot}/pxeboot/EFI
install -v -d -m 755 %{buildroot}/pxeboot/EFI/centos
ln -s %{_prefix}/lib/grub/x86_64-efi %{buildroot}/pxeboot/EFI/centos/x86_64-efi
install -v -d -m 755 %{buildroot}/var/pxeboot
install -v -d -m 755 %{buildroot}/var/pxeboot/pxelinux.cfg.files
install -v -d -m 755 %{buildroot}/var/pxeboot/rel-%{platform_release}
install -v -d -m 755 %{buildroot}/var/pxeboot/EFI
install -v -d -m 755 %{buildroot}/var/pxeboot/EFI/centos
ln -s %{_prefix}/lib/grub/x86_64-efi %{buildroot}/var/pxeboot/EFI/centos/x86_64-efi
install -v -m 644 %{_sourcedir}/vmlinuz \
%{buildroot}/pxeboot/rel-%{platform_release}/installer-bzImage_1.0
%{buildroot}/var/pxeboot/rel-%{platform_release}/installer-bzImage_1.0
install -v -m 644 %{_sourcedir}/initrd.img \
%{buildroot}/pxeboot/rel-%{platform_release}/installer-intel-x86-64-initrd_1.0
ln -s installer-bzImage_1.0 %{buildroot}/pxeboot/rel-%{platform_release}/installer-bzImage
ln -s installer-intel-x86-64-initrd_1.0 %{buildroot}/pxeboot/rel-%{platform_release}/installer-initrd
%{buildroot}/var/pxeboot/rel-%{platform_release}/installer-intel-x86-64-initrd_1.0
ln -s installer-bzImage_1.0 %{buildroot}/var/pxeboot/rel-%{platform_release}/installer-bzImage
ln -s installer-intel-x86-64-initrd_1.0 %{buildroot}/var/pxeboot/rel-%{platform_release}/installer-initrd
install -v -D -m 644 %{_sourcedir}/squashfs.img \
%{buildroot}/var/www/pages/feed/rel-%{platform_release}/LiveOS/squashfs.img
@ -71,49 +71,49 @@ install -v -d -m 755 %{buildroot}%{_sbindir}
install -v -m 755 %{_sourcedir}/pxeboot-update.sh %{buildroot}%{_sbindir}/pxeboot-update-%{platform_release}.sh
install -v -m 644 %{_sourcedir}/default \
%{buildroot}/pxeboot/pxelinux.cfg.files/default
%{buildroot}/var/pxeboot/pxelinux.cfg.files/default
install -v -m 644 %{_sourcedir}/default.static \
%{buildroot}/pxeboot/pxelinux.cfg.files/default.static
%{buildroot}/var/pxeboot/pxelinux.cfg.files/default.static
install -v -m 644 %{_sourcedir}/centos-pxe-controller-install \
%{buildroot}/pxeboot/pxelinux.cfg.files/pxe-controller-install-%{platform_release}
%{buildroot}/var/pxeboot/pxelinux.cfg.files/pxe-controller-install-%{platform_release}
install -v -m 644 %{_sourcedir}/centos-pxe-worker-install \
%{buildroot}/pxeboot/pxelinux.cfg.files/pxe-worker-install-%{platform_release}
%{buildroot}/var/pxeboot/pxelinux.cfg.files/pxe-worker-install-%{platform_release}
install -v -m 644 %{_sourcedir}/centos-pxe-smallsystem-install \
%{buildroot}/pxeboot/pxelinux.cfg.files/pxe-smallsystem-install-%{platform_release}
%{buildroot}/var/pxeboot/pxelinux.cfg.files/pxe-smallsystem-install-%{platform_release}
install -v -m 644 %{_sourcedir}/centos-pxe-storage-install \
%{buildroot}/pxeboot/pxelinux.cfg.files/pxe-storage-install-%{platform_release}
%{buildroot}/var/pxeboot/pxelinux.cfg.files/pxe-storage-install-%{platform_release}
install -v -m 644 %{_sourcedir}/centos-pxe-worker_lowlatency-install \
%{buildroot}/pxeboot/pxelinux.cfg.files/pxe-worker_lowlatency-install-%{platform_release}
%{buildroot}/var/pxeboot/pxelinux.cfg.files/pxe-worker_lowlatency-install-%{platform_release}
install -v -m 644 %{_sourcedir}/centos-pxe-smallsystem_lowlatency-install \
%{buildroot}/pxeboot/pxelinux.cfg.files/pxe-smallsystem_lowlatency-install-%{platform_release}
%{buildroot}/var/pxeboot/pxelinux.cfg.files/pxe-smallsystem_lowlatency-install-%{platform_release}
# UEFI support
install -v -m 644 %{_sourcedir}/pxe-grub.cfg \
%{buildroot}/pxeboot/pxelinux.cfg.files/grub.cfg
%{buildroot}/var/pxeboot/pxelinux.cfg.files/grub.cfg
install -v -m 644 %{_sourcedir}/pxe-grub.cfg.static \
%{buildroot}/pxeboot/pxelinux.cfg.files/grub.cfg.static
%{buildroot}/var/pxeboot/pxelinux.cfg.files/grub.cfg.static
# Copy EFI boot image. It will be used to create ISO on the Controller.
install -v -m 644 %{_sourcedir}/efiboot.img \
%{buildroot}/pxeboot/rel-%{platform_release}/
%{buildroot}/var/pxeboot/rel-%{platform_release}/
install -v -m 644 %{_sourcedir}/efi-centos-pxe-controller-install \
%{buildroot}/pxeboot/pxelinux.cfg.files/efi-pxe-controller-install-%{platform_release}
%{buildroot}/var/pxeboot/pxelinux.cfg.files/efi-pxe-controller-install-%{platform_release}
install -v -m 644 %{_sourcedir}/efi-centos-pxe-worker-install \
%{buildroot}/pxeboot/pxelinux.cfg.files/efi-pxe-worker-install-%{platform_release}
%{buildroot}/var/pxeboot/pxelinux.cfg.files/efi-pxe-worker-install-%{platform_release}
install -v -m 644 %{_sourcedir}/efi-centos-pxe-smallsystem-install \
%{buildroot}/pxeboot/pxelinux.cfg.files/efi-pxe-smallsystem-install-%{platform_release}
%{buildroot}/var/pxeboot/pxelinux.cfg.files/efi-pxe-smallsystem-install-%{platform_release}
install -v -m 644 %{_sourcedir}/efi-centos-pxe-storage-install \
%{buildroot}/pxeboot/pxelinux.cfg.files/efi-pxe-storage-install-%{platform_release}
%{buildroot}/var/pxeboot/pxelinux.cfg.files/efi-pxe-storage-install-%{platform_release}
install -v -m 644 %{_sourcedir}/efi-centos-pxe-worker_lowlatency-install \
%{buildroot}/pxeboot/pxelinux.cfg.files/efi-pxe-worker_lowlatency-install-%{platform_release}
%{buildroot}/var/pxeboot/pxelinux.cfg.files/efi-pxe-worker_lowlatency-install-%{platform_release}
install -v -m 644 %{_sourcedir}/efi-centos-pxe-smallsystem_lowlatency-install \
%{buildroot}/pxeboot/pxelinux.cfg.files/efi-pxe-smallsystem_lowlatency-install-%{platform_release}
%{buildroot}/var/pxeboot/pxelinux.cfg.files/efi-pxe-smallsystem_lowlatency-install-%{platform_release}
ln -sf /pxeboot/EFI/grubx64.efi %{buildroot}/pxeboot/grubx64.efi
ln -sf /var/pxeboot/EFI/grubx64.efi %{buildroot}/var/pxeboot/grubx64.efi
sed -i "s/xxxSW_VERSIONxxx/%{platform_release}/g" \
%{buildroot}/pxeboot/pxelinux.cfg.files/pxe-* \
%{buildroot}/pxeboot/pxelinux.cfg.files/efi-pxe-*
%{buildroot}/var/pxeboot/pxelinux.cfg.files/pxe-* \
%{buildroot}/var/pxeboot/pxelinux.cfg.files/efi-pxe-*
# Copy files from the syslinux pkg
install -v -m 0644 \
@ -125,20 +125,20 @@ install -v -m 0644 \
%{_datadir}/syslinux/pxechain.com \
%{_datadir}/syslinux/pxelinux.0 \
%{_datadir}/syslinux/gpxelinux.0 \
%{buildroot}/pxeboot
%{buildroot}/var/pxeboot
# Copy StarlingX grub.cfg. It will be used to create ISO on the Controller.
install -v -m 0644 %{_sourcedir}/grub.cfg \
%{buildroot}/pxeboot/EFI/
%{buildroot}/var/pxeboot/EFI/
# UEFI bootloader expect the grub.cfg file to be in /pxeboot/ so create a symlink for it
ln -s pxelinux.cfg/grub.cfg %{buildroot}/pxeboot/grub.cfg
ln -s pxelinux.cfg/grub.cfg %{buildroot}/var/pxeboot/grub.cfg
%files
%license ../SOURCES/LICENSE
%defattr(-,root,root,-)
%dir /pxeboot
/pxeboot/*
%dir /var/pxeboot
/var/pxeboot/*
%{_sbindir}/pxeboot-update-%{platform_release}.sh
/var/www/pages/feed/rel-%{platform_release}/LiveOS/squashfs.img

View File

@ -10,8 +10,8 @@
# for BIOS and UEFI mode. This script logs to user.log
#
# Command example;
# /usr/sbin/pxeboot-update-18.03.sh -i /pxeboot/pxelinux.cfg.files/pxe-controller-install-18.03
# -o /pxeboot/pxelinux.cfg/01-08-00-27-3e-f8-05 -b sda -r sda -t -c ttyS0,115200
# /usr/sbin/pxeboot-update-18.03.sh -i /var/pxeboot/pxelinux.cfg.files/pxe-controller-install-18.03
# -o /var/pxeboot/pxelinux.cfg/01-08-00-27-3e-f8-05 -b sda -r sda -t -c ttyS0,115200
#
function usage {