Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

30ignition/ignition-setup-user: mount /boot partition ro #134

Merged
merged 1 commit into from
Nov 7, 2019

Conversation

jlebon
Copy link
Member

@jlebon jlebon commented Nov 7, 2019

We don't actually need write access to /boot here to pull out any
baked Ignition config. Just mount it read-only.

This also helps in the case where any other service is concurrently also
mounting /boot: trying to mount a device as read-write that's already
mounted read-only elsewhere will fail. I hit this when playing with FIPS
mode, which does this:

https://github.com/dracutdevs/dracut/blob/718aefda1374c7b6c3790b08cae27fd6bde505af/modules.d/01fips/fips.sh#L49

We don't actually need write access to `/boot` here to pull out any
baked Ignition config. Just mount it read-only.

This also helps in the case where any other service is concurrently also
mounting `/boot`: trying to mount a device as read-write that's already
mounted read-only elsewhere will fail. I hit this when playing with FIPS
mode, which does this:

https://github.com/dracutdevs/dracut/blob/718aefda1374c7b6c3790b08cae27fd6bde505af/modules.d/01fips/fips.sh#L49
@jlebon
Copy link
Member Author

jlebon commented Nov 7, 2019

Not sure if there's a cleaner way to solve this. Note that mount namespaces/propagation doesn't solve this; understandably, those restrictions apply system-wide.

@jlebon
Copy link
Member Author

jlebon commented Nov 7, 2019

We'll need this backported to the spec2x branch as well.

Copy link
Member

@miabbott miabbott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me

@cgwalters cgwalters merged commit d9e8a63 into coreos:master Nov 7, 2019
jlebon added a commit to jlebon/ignition-dracut that referenced this pull request Nov 7, 2019
We don't actually need write access to `/boot` here to pull out any
baked Ignition config. Just mount it read-only.

This also helps in the case where any other service is concurrently also
mounting `/boot`: trying to mount a device as read-write that's already
mounted read-only elsewhere will fail. I hit this when playing with FIPS
mode, which does this:

https://github.com/dracutdevs/dracut/blob/718aefda1374c7b6c3790b08cae27fd6bde505af/modules.d/01fips/fips.sh#L49

(backport of coreos#134)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants