From a9a0b15b3a2f9b664996b87d802a6901c2b086ec Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Thu, 27 Apr 2023 01:17:08 +0000 Subject: [PATCH] remove system.devices from lvm variants (#9) (#10) Potential PR for issue #9 Co-authored-by: Louis Abel Reviewed-on: https://git.resf.org/sig_core/kickstarts/pulls/10 Co-authored-by: Louis Abel Co-committed-by: Louis Abel --- Rocky-9-Azure-LVM.ks | 3 +++ Rocky-9-EC2-LVM.ks | 3 +++ Rocky-9-GenericCloud-LVM.ks | 3 +++ cloud/rocky-azure-lvm.ks | 3 +++ cloud/rocky-ec2-lvm.ks | 3 +++ cloud/rocky-genclo-lvm.ks | 3 +++ cloud/rocky-ocp-base.ks | 6 ++++++ 7 files changed, 24 insertions(+) diff --git a/Rocky-9-Azure-LVM.ks b/Rocky-9-Azure-LVM.ks index 2a225e6..9b33dc3 100644 --- a/Rocky-9-Azure-LVM.ks +++ b/Rocky-9-Azure-LVM.ks @@ -219,6 +219,9 @@ touch /var/log/boot.log mkdir -p /var/cache/yum /usr/sbin/fixfiles -R -a restore +# LVM Variant Fix, remove system.devices +rm -fv /etc/lvm/devices/system.devices + true %end diff --git a/Rocky-9-EC2-LVM.ks b/Rocky-9-EC2-LVM.ks index d2972d6..7475be6 100644 --- a/Rocky-9-EC2-LVM.ks +++ b/Rocky-9-EC2-LVM.ks @@ -224,5 +224,8 @@ cat >> /etc/chrony.conf << EOF server 169.254.169.123 prefer iburst minpoll 4 maxpoll 4 EOF +# LVM Variant Fix, remove system.devices +rm -fv /etc/lvm/devices/system.devices + %end diff --git a/Rocky-9-GenericCloud-LVM.ks b/Rocky-9-GenericCloud-LVM.ks index d534b80..25095f3 100644 --- a/Rocky-9-GenericCloud-LVM.ks +++ b/Rocky-9-GenericCloud-LVM.ks @@ -228,6 +228,9 @@ cat /dev/null > /etc/machine-id # reorder console entries #sed -i 's/console=tty0/console=tty0 console=ttyS0,115200n8/' /boot/grub2/grub.cfg +# LVM Variant Fix, remove system.devices +rm -fv /etc/lvm/devices/system.devices + true %end diff --git a/cloud/rocky-azure-lvm.ks b/cloud/rocky-azure-lvm.ks index 930c5bc..2966d10 100644 --- a/cloud/rocky-azure-lvm.ks +++ b/cloud/rocky-azure-lvm.ks @@ -163,6 +163,9 @@ touch /var/log/boot.log mkdir -p /var/cache/yum /usr/sbin/fixfiles -R -a restore +# LVM Variant Fix, remove system.devices +rm -fv /etc/lvm/devices/system.devices + true %end diff --git a/cloud/rocky-ec2-lvm.ks b/cloud/rocky-ec2-lvm.ks index 62f7e5d..7702c56 100644 --- a/cloud/rocky-ec2-lvm.ks +++ b/cloud/rocky-ec2-lvm.ks @@ -130,4 +130,7 @@ cat >> /etc/chrony.conf << EOF server 169.254.169.123 prefer iburst minpoll 4 maxpoll 4 EOF +# LVM Variant Fix, remove system.devices +rm -fv /etc/lvm/devices/system.devices + %end diff --git a/cloud/rocky-genclo-lvm.ks b/cloud/rocky-genclo-lvm.ks index 465c596..1a6b160 100644 --- a/cloud/rocky-genclo-lvm.ks +++ b/cloud/rocky-genclo-lvm.ks @@ -123,6 +123,9 @@ cat /dev/null > /etc/machine-id # reorder console entries #sed -i 's/console=tty0/console=tty0 console=ttyS0,115200n8/' /boot/grub2/grub.cfg +# LVM Variant Fix, remove system.devices +rm -fv /etc/lvm/devices/system.devices + true %end diff --git a/cloud/rocky-ocp-base.ks b/cloud/rocky-ocp-base.ks index 9c3479e..3b78dcf 100644 --- a/cloud/rocky-ocp-base.ks +++ b/cloud/rocky-ocp-base.ks @@ -289,6 +289,12 @@ LSBwb3dlci1zdGF0ZS1jaGFuZ2UKCg==" base64 -d <<<"$OCICLOUDCFG" >> /etc/cloud/cloud.cfg.d/99_oci.cfg +# Remove system.devices because Oracle does things. +rm -fv /etc/lvm/devices/system.devices + +# Start OCId +systemctl enable ocid + # Rerun dracut for the installed kernel (not the running kernel): KERNEL_VERSION=$(rpm -q kernel --qf '%%{V}-%%{R}.%%{arch}\n') dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION