From 03e3497d209e7d355e85638ed23b01e4b19a8b16 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 19 Jun 2020 08:28:25 -0400 Subject: [PATCH] Use the image rpm for install The image must be extracted from an rpm, for some reason or another. --- .../initramfs/usr/lib/dracut/hooks/initqueue/01-confluent.sh | 1 - confluent_osdeploy/rhvh4/profiles/default/initprofile.sh | 1 + confluent_osdeploy/rhvh4/profiles/default/kickstart | 2 +- confluent_osdeploy/rhvh4/profiles/default/scripts/pre.sh | 5 +++++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/confluent_osdeploy/rhvh4/initramfs/usr/lib/dracut/hooks/initqueue/01-confluent.sh b/confluent_osdeploy/rhvh4/initramfs/usr/lib/dracut/hooks/initqueue/01-confluent.sh index 1cbd5e01..ec153ed4 100644 --- a/confluent_osdeploy/rhvh4/initramfs/usr/lib/dracut/hooks/initqueue/01-confluent.sh +++ b/confluent_osdeploy/rhvh4/initramfs/usr/lib/dracut/hooks/initqueue/01-confluent.sh @@ -60,7 +60,6 @@ fi # RHV must not have a repo #echo inst.repo=$proto://$mgr/confluent-public/os/$profilename/distribution >> /etc/cmdline.d/01-confluent.conf -echo liveimg --url=$proto://$mgr/confluent-public/os/$profilename/distribution/LiveOS/squashfs.img >> /etc/confluent/rhv.path echo inst.ks=$proto://$mgr/confluent-public/os/$profilename/kickstart >> /etc/cmdline.d/01-confluent.conf kickstart=$proto://$mgr/confluent-public/os/$profilename/kickstart root=anaconda-net:$proto://$mgr/confluent-public/os/$profilename/distribution diff --git a/confluent_osdeploy/rhvh4/profiles/default/initprofile.sh b/confluent_osdeploy/rhvh4/profiles/default/initprofile.sh index fdea9df3..c9b21915 100644 --- a/confluent_osdeploy/rhvh4/profiles/default/initprofile.sh +++ b/confluent_osdeploy/rhvh4/profiles/default/initprofile.sh @@ -4,4 +4,5 @@ ln -s $1/images/pxeboot/vmlinuz $2/boot/kernel && \ ln -s $1/images/pxeboot/initrd.img $2/boot/initramfs/distribution mkdir -p $2/boot/efi/boot && \ ln -s $1/EFI/BOOT/BOOTX64.EFI $1/EFI/BOOT/grubx64.efi $2/boot/efi/boot/ +ln -s $(find $1 -name '*host-image*rpm') $2/image.rpm diff --git a/confluent_osdeploy/rhvh4/profiles/default/kickstart b/confluent_osdeploy/rhvh4/profiles/default/kickstart index 5f3c6b34..89db4e07 100644 --- a/confluent_osdeploy/rhvh4/profiles/default/kickstart +++ b/confluent_osdeploy/rhvh4/profiles/default/kickstart @@ -30,7 +30,7 @@ # instead %include /tmp/partitioning -%include /etc/confluent/rhv.path +liveimg --url=file:///tmp/install.img reboot diff --git a/confluent_osdeploy/rhvh4/profiles/default/scripts/pre.sh b/confluent_osdeploy/rhvh4/profiles/default/scripts/pre.sh index 0ec4b16b..209d6e0d 100644 --- a/confluent_osdeploy/rhvh4/profiles/default/scripts/pre.sh +++ b/confluent_osdeploy/rhvh4/profiles/default/scripts/pre.sh @@ -58,3 +58,8 @@ if [ -e /tmp/installdisk ]; then echo ignoredisk --only-use $(cat /tmp/installdisk) >> /tmp/partitioning echo autopart --type=thinp --nohome $LUKSPARTY >> /tmp/partitioning fi +cd $(mktemp -d) +/etc/confluent/apiclient /confluent-public/os/$profile/image.rpm -o image.rpm +rpm2cpio image.rpm | cpio -dumi +ln -s $(find . -name *img) /tmp/install.img +