Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coreos-secex-ignition-prepare: remount /usr rw if needed #3241

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
nikita-dubrovskii marked this conversation as resolved.
Show resolved Hide resolved
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
Loading