From b2a40e13705d63d5b43a02d30aafad491a7a7a84 Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Tue, 3 Nov 2026 17:18:46 +0100 Subject: [PATCH] Skip deactivating volume groups when lvm is absent lvm is optional in the capture initramfs now, so installimage printed 'lvm: command not found' on every install of a capture taken from a host without lvm2. Only run it when it is there. --- .../el7-diskless/profiles/default/scripts/installimage | 2 +- .../el8-diskless/profiles/default/scripts/installimage | 2 +- .../el9-diskless/profiles/default/scripts/installimage | 2 +- .../ubuntu20.04-diskless/profiles/default/scripts/installimage | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/confluent_osdeploy/el7-diskless/profiles/default/scripts/installimage b/confluent_osdeploy/el7-diskless/profiles/default/scripts/installimage index 5a462445..c77a2c13 100644 --- a/confluent_osdeploy/el7-diskless/profiles/default/scripts/installimage +++ b/confluent_osdeploy/el7-diskless/profiles/default/scripts/installimage @@ -29,7 +29,7 @@ if [ ! -f /sysroot/tmp/installdisk ]; then sleep 1 done fi -lvm vgchange -a n +if command -v lvm > /dev/null; then lvm vgchange -a n; fi # lvm is optional in the initramfs udevadm control -e chroot /sysroot /usr/lib/systemd/systemd-udevd --daemon chroot /sysroot bash -c "source /etc/confluent/functions; run_remote_python image2disk.py" diff --git a/confluent_osdeploy/el8-diskless/profiles/default/scripts/installimage b/confluent_osdeploy/el8-diskless/profiles/default/scripts/installimage index 031b1479..e2532494 100644 --- a/confluent_osdeploy/el8-diskless/profiles/default/scripts/installimage +++ b/confluent_osdeploy/el8-diskless/profiles/default/scripts/installimage @@ -36,7 +36,7 @@ if [ ! -f /sysroot/tmp/installdisk ]; then sleep 1 done fi -lvm vgchange -a n +if command -v lvm > /dev/null; then lvm vgchange -a n; fi # lvm is optional in the initramfs udevadm control -e if [ -f /sysroot/etc/lvm/devices/system.devices ]; then rm /sysroot/etc/lvm/devices/system.devices diff --git a/confluent_osdeploy/el9-diskless/profiles/default/scripts/installimage b/confluent_osdeploy/el9-diskless/profiles/default/scripts/installimage index eef9da18..bec197a3 100644 --- a/confluent_osdeploy/el9-diskless/profiles/default/scripts/installimage +++ b/confluent_osdeploy/el9-diskless/profiles/default/scripts/installimage @@ -41,7 +41,7 @@ if [ ! -f /sysroot/tmp/installdisk ]; then sleep 1 done fi -lvm vgchange -a n +if command -v lvm > /dev/null; then lvm vgchange -a n; fi # lvm is optional in the initramfs /sysroot/usr/sbin/wipefs -a /dev/$(cat /sysroot/tmp/installdisk) udevadm control -e if [ -f /sysroot/etc/lvm/devices/system.devices ]; then diff --git a/confluent_osdeploy/ubuntu20.04-diskless/profiles/default/scripts/installimage b/confluent_osdeploy/ubuntu20.04-diskless/profiles/default/scripts/installimage index a62bce6b..8be29fc7 100644 --- a/confluent_osdeploy/ubuntu20.04-diskless/profiles/default/scripts/installimage +++ b/confluent_osdeploy/ubuntu20.04-diskless/profiles/default/scripts/installimage @@ -31,7 +31,7 @@ if [ ! -f /sysroot/tmp/installdisk ]; then sleep 1 done fi -lvm vgchange -a n +if command -v lvm > /dev/null; then lvm vgchange -a n; fi # lvm is optional in the initramfs udevadm control -e if [ -f /sysroot/etc/lvm/devices/system.devices ]; then rm /sysroot/etc/lvm/devices/system.devices