From 377140fac2902a062824c9361d85c5b2776f7ad7 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 | 7 ++++++- 1 file changed, 6 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..7652481cb7 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,11 @@ if [ "${PTUUID:-}" != "$UNINITIALIZED_GUID" ]; then exit 0 fi +# See: https://github.com/coreos/ignition/issues/1926 +sgdiskcmd="/usr/sbin/sgdisk" +if [[ -x "/usr/libexec/ignition-sgdisk" ]]; then + sgdiskcmd="/usr/libexec/ignition-sgdisk" +fi echo "Randomizing disk GUID" -sgdisk --disk-guid=R --move-second-header "$PKNAME" +"$sgdiskcmd" --disk-guid=R --move-second-header "$PKNAME" udevadm settle || :