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 || :