From ab74164d832808208a535520f6752a00662c9645 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Tue, 12 Feb 2019 16:57:21 -0800 Subject: [PATCH] Make the lorax-composer ks templates more generic Some platforms do not have grub2, and some require other partitions. Anaconda will add platform specific partitions if the 'reqpart' command is included, and it will add bootloader specific packages to the list if they are needed. (cherry picked from commit d27b4fcbd45d80a461aab663424326991c15151e) --- share/composer/ami.ks | 3 ++- share/composer/openstack.ks | 3 ++- share/composer/partitioned-disk.ks | 3 ++- share/composer/qcow2.ks | 3 ++- share/composer/vhd.ks | 3 ++- share/composer/vmdk.ks | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/share/composer/ami.ks b/share/composer/ami.ks index 7393c7f8..023e3389 100644 --- a/share/composer/ami.ks +++ b/share/composer/ami.ks @@ -23,6 +23,8 @@ shutdown timezone US/Eastern # System bootloader configuration bootloader --location=mbr --append="no_timer_check console=ttyS0,115200n8 console=tty1 net.ifnames=0" +# Add platform specific partitions +reqpart # Basic services services --enabled=sshd,chronyd,cloud-init @@ -43,7 +45,6 @@ sed -i 's/cloud-user/ec2-user/' /etc/cloud/cloud.cfg kernel -dracut-config-rescue selinux-policy-targeted -grub2 chrony diff --git a/share/composer/openstack.ks b/share/composer/openstack.ks index 8823a16b..4872e2b2 100644 --- a/share/composer/openstack.ks +++ b/share/composer/openstack.ks @@ -20,6 +20,8 @@ shutdown timezone US/Eastern # System bootloader configuration bootloader --location=mbr --append="no_timer_check console=ttyS0,115200n8 console=tty1 net.ifnames=0" +# Add platform specific partitions +reqpart # Start sshd and cloud-init at boot time services --enabled=sshd,cloud-init,cloud-init-local,cloud-config,cloud-final @@ -37,7 +39,6 @@ touch /etc/machine-id kernel -dracut-config-rescue selinux-policy-targeted -grub2 # Make sure virt guest agents are installed qemu-guest-agent diff --git a/share/composer/partitioned-disk.ks b/share/composer/partitioned-disk.ks index 468b25fa..04d16488 100644 --- a/share/composer/partitioned-disk.ks +++ b/share/composer/partitioned-disk.ks @@ -20,6 +20,8 @@ shutdown timezone US/Eastern # System bootloader configuration bootloader --location=mbr +# Add platform specific partitions +reqpart %post # Remove random-seed @@ -34,6 +36,5 @@ touch /etc/machine-id kernel -dracut-config-rescue selinux-policy-targeted -grub2 # NOTE lorax-composer will add the blueprint packages below here, including the final %end diff --git a/share/composer/qcow2.ks b/share/composer/qcow2.ks index 824f6deb..cea868c8 100644 --- a/share/composer/qcow2.ks +++ b/share/composer/qcow2.ks @@ -20,6 +20,8 @@ shutdown timezone US/Eastern # System bootloader configuration bootloader --location=mbr +# Add platform specific partitions +reqpart %post # Remove random-seed @@ -34,7 +36,6 @@ touch /etc/machine-id kernel -dracut-config-rescue selinux-policy-targeted -grub2 # Make sure virt guest agents are installed qemu-guest-agent diff --git a/share/composer/vhd.ks b/share/composer/vhd.ks index 105012a8..414adf38 100644 --- a/share/composer/vhd.ks +++ b/share/composer/vhd.ks @@ -23,6 +23,8 @@ shutdown timezone US/Eastern # System bootloader configuration bootloader --location=mbr --append="no_timer_check console=ttyS0,115200n8 earlyprintk=ttyS0,115200 rootdelay=300 net.ifnames=0" +# Add platform specific partitions +reqpart # Basic services services --enabled=sshd,chronyd,waagent @@ -62,7 +64,6 @@ dracut -f -v --persistent-policy by-uuid kernel -dracut-config-rescue selinux-policy-targeted -grub2 chrony diff --git a/share/composer/vmdk.ks b/share/composer/vmdk.ks index 63a3b3a9..ab8e3559 100644 --- a/share/composer/vmdk.ks +++ b/share/composer/vmdk.ks @@ -20,6 +20,8 @@ shutdown timezone US/Eastern # System bootloader configuration bootloader --location=mbr +# Add platform specific partitions +reqpart # Basic services services --enabled=sshd,chronyd,vmtoolsd @@ -37,7 +39,6 @@ touch /etc/machine-id kernel -dracut-config-rescue selinux-policy-targeted -grub2 chrony open-vm-tools