Skip to content

Commit

Permalink
40ignition-ostree/ignition-ostree-growfs: Fix Secure Execution firstb…
Browse files Browse the repository at this point in the history
…oot error

Do not try to mount disk when running in Secure Execution mode.

Fixes: openshift/os#1264

Signed-off-by: Jan Schintag <[email protected]>
  • Loading branch information
jschintag authored and c4rt0 committed May 17, 2023
1 parent bd8ad32 commit 5894783
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ set -euo pipefail
# partition, unless it determines that either the rootfs was moved or the
# partition was already resized (e.g. via Ignition).

# In the IBM Secure Execution case we use Ignition to grow and reencrypt rootfs
# see overlay.d/05core/usr/lib/dracut/modules.d/35coreos-ignition/coreos-diskful-generator
if [[ -f /run/coreos/secure-execution ]]; then
exit 0
fi

# This is copied from ignition-ostree-transposefs.sh.
# Sometimes, for some reason the by-label symlinks aren't updated. Detect these
# cases, and explicitly `udevadm trigger`.
Expand Down Expand Up @@ -42,12 +48,6 @@ path=/sysroot
src=/dev/disk/by-label/root
mount "${src}" "${path}"

# In the IBM Secure Execution case we use Ignition to grow and reencrypt rootfs
# see overlay.d/05core/usr/lib/dracut/modules.d/35coreos-ignition/coreos-diskful-generator
if [[ -f /run/coreos/secure-execution ]]; then
exit 0
fi

if [ ! -f "${saved_partstate}" ]; then
partition=$(realpath /dev/disk/by-label/root)
else
Expand Down

0 comments on commit 5894783

Please sign in to comment.