From af68536baddb1b9ed1b3980a32b15a15434d9886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Ravier?= Date: Wed, 28 Aug 2024 14:20:15 +0200 Subject: [PATCH] overlay.d/05core: Prepare for Ignition migration off sgdisk Look for sgdisk in the alternative libexec path on EL systems as a temporary workaround until we complete the migration from gdisk to fdisk in Ignition. See: https://github.com/coreos/ignition/issues/1926 See: https://issues.redhat.com/browse/RHEL-56080 --- .../dracut/modules.d/35coreos-ignition/coreos-gpt-setup.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-ignition/coreos-gpt-setup.sh b/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-ignition/coreos-gpt-setup.sh index 11cebd34f3..eb81cd5135 100755 --- a/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-ignition/coreos-gpt-setup.sh +++ b/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-ignition/coreos-gpt-setup.sh @@ -26,6 +26,8 @@ if [ "${PTUUID:-}" != "$UNINITIALIZED_GUID" ]; then exit 0 fi +# See: https://github.com/coreos/ignition/issues/1926 +sgdiskcmd="$(which sgdisk 2>/dev/null || echo "/usr/libexec/ignition-sgdisk")" echo "Randomizing disk GUID" -sgdisk --disk-guid=R --move-second-header "$PKNAME" +"$sgdiskcmd" --disk-guid=R --move-second-header "$PKNAME" udevadm settle || :