diff --git a/share/composer/ami.ks b/share/composer/ami.ks index d0926afb..9cbb5472 100644 --- a/share/composer/ami.ks +++ b/share/composer/ami.ks @@ -36,11 +36,13 @@ touch /etc/machine-id # tell cloud-init to create the ec2-user account sed -i 's/cloud-user/ec2-user/' /etc/cloud/cloud.cfg + +# Remove the rescue kernel and image to save space +rm -f /boot/*-rescue* %end %packages kernel --dracut-config-rescue selinux-policy-targeted chrony diff --git a/share/composer/ext4-filesystem.ks b/share/composer/ext4-filesystem.ks index e2616b30..1f3166cb 100644 --- a/share/composer/ext4-filesystem.ks +++ b/share/composer/ext4-filesystem.ks @@ -28,6 +28,9 @@ rm /var/lib/systemd/random-seed # Clear /etc/machine-id rm /etc/machine-id touch /etc/machine-id + +# Remove the rescue kernel and image to save space +rm -f /boot/*-rescue* %end # NOTE Do NOT add any other sections after %packages diff --git a/share/composer/openstack.ks b/share/composer/openstack.ks index 2068e936..11226b71 100644 --- a/share/composer/openstack.ks +++ b/share/composer/openstack.ks @@ -33,11 +33,13 @@ rm /var/lib/systemd/random-seed # Clear /etc/machine-id rm /etc/machine-id touch /etc/machine-id + +# Remove the rescue kernel and image to save space +rm -f /boot/*-rescue* %end %packages kernel --dracut-config-rescue selinux-policy-targeted # Make sure virt guest agents are installed diff --git a/share/composer/partitioned-disk.ks b/share/composer/partitioned-disk.ks index a032c484..33b54dba 100644 --- a/share/composer/partitioned-disk.ks +++ b/share/composer/partitioned-disk.ks @@ -30,11 +30,13 @@ rm /var/lib/systemd/random-seed # Clear /etc/machine-id rm /etc/machine-id touch /etc/machine-id + +# Remove the rescue kernel and image to save space +rm -f /boot/*-rescue* %end %packages kernel --dracut-config-rescue selinux-policy-targeted # 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 d8187dd6..d953b23f 100644 --- a/share/composer/qcow2.ks +++ b/share/composer/qcow2.ks @@ -30,11 +30,13 @@ rm /var/lib/systemd/random-seed # Clear /etc/machine-id rm /etc/machine-id touch /etc/machine-id + +# Remove the rescue kernel and image to save space +rm -f /boot/*-rescue* %end %packages kernel --dracut-config-rescue selinux-policy-targeted # Make sure virt guest agents are installed diff --git a/share/composer/tar.ks b/share/composer/tar.ks index be893f94..f6af8032 100644 --- a/share/composer/tar.ks +++ b/share/composer/tar.ks @@ -28,6 +28,9 @@ rm /var/lib/systemd/random-seed # Clear /etc/machine-id rm /etc/machine-id touch /etc/machine-id + +# Remove the rescue kernel and image to save space +rm -f /boot/*-rescue* %end # NOTE Do NOT add any other sections after %packages diff --git a/share/composer/vhd.ks b/share/composer/vhd.ks index da82ae11..84bd457f 100644 --- a/share/composer/vhd.ks +++ b/share/composer/vhd.ks @@ -34,6 +34,9 @@ rm /var/lib/systemd/random-seed rm /etc/machine-id touch /etc/machine-id +# Remove the rescue kernel and image to save space +rm -f /boot/*-rescue* + # This file is required by waagent in RHEL, but compatible with NetworkManager cat > /etc/sysconfig/network-scripts/ifcfg-eth0 << EOF DEVICE=eth0 @@ -59,7 +62,6 @@ dracut -f -v --persistent-policy by-uuid %packages kernel --dracut-config-rescue selinux-policy-targeted chrony diff --git a/share/composer/vmdk.ks b/share/composer/vmdk.ks index e0a57f91..ecfba176 100644 --- a/share/composer/vmdk.ks +++ b/share/composer/vmdk.ks @@ -33,11 +33,13 @@ rm /var/lib/systemd/random-seed # Clear /etc/machine-id rm /etc/machine-id touch /etc/machine-id + +# Remove the rescue kernel and image to save space +rm -f /boot/*-rescue* %end %packages kernel --dracut-config-rescue selinux-policy-targeted chrony