Skip to content

Commit

Permalink
overlay.d/05core: Prepare for Ignition migration off sgdisk
Browse files Browse the repository at this point in the history
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: coreos/ignition#1926
See: https://issues.redhat.com/browse/RHEL-56080
  • Loading branch information
travier committed Aug 28, 2024
1 parent 7f865c8 commit 377140f
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 || :

0 comments on commit 377140f

Please sign in to comment.