Skip to content

Commit

Permalink
coreos-secex-ignition-prepare: remount /usr rw if needed
Browse files Browse the repository at this point in the history
Fedora 41 comes with systemd-256, where /usr is read-only during
initramfs time.

See similar issue description in coreos/ignition#1891
  • Loading branch information
nikita-dubrovskii committed Nov 6, 2024
1 parent 6b6f1f7 commit 0419500
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@ Before=ignition-fetch-offline.service

[Service]
Type=oneshot
# Set to slave so rw remounting of /usr won't be for other units
MountFlags=slave
RemainAfterExit=yes
ExecStart=/usr/sbin/coreos-secex-ignition-prepare
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ cleanup() {

trap cleanup EXIT

# Fedora 41 comes with systemd-256, where /usr is read-only during initramfs time.
# https://github.com/coreos/ignition/issues/1891
if [ ! -w /usr ]; then
mount -o rw,remount /usr
fi

# copy base Secure Execution config (enables LUKS+dm-verity for boot and root partitions)
cp /usr/lib/coreos/01-secex.ign /usr/lib/ignition/base.d/01-secex.ign

Expand Down

0 comments on commit 0419500

Please sign in to comment.