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

Mount root filesystem as readonly instead of adding immutable attribute #1812

Open
yummypeng opened this issue Oct 11, 2024 · 5 comments
Open

Comments

@yummypeng
Copy link

Describe the enhancement

I'm curious why Fedora CoreOS adds an immutable attribute to the root directory / instead of just mounting the root device as read-only. I tried changing the kernel cmdline from rw to ro myself, and didn't see any problems; the system booted fine, and I could still install packages using rpm-ostree.

System details

No response

Additional information

No response

@yummypeng yummypeng changed the title Mount root filesystem as readonly instead of immutable attribute Mount root filesystem as readonly instead of adding immutable attribute Oct 11, 2024
@jbtrystram
Copy link
Contributor

This is solved by the recent enablement of composefs, which should hit stable very soon (next release, so in a couple of weeks)
https://docs.fedoraproject.org/en-US/fedora-coreos/composefs/

As to why the immutable bit rather than ro, it's probably for some historical reasons.. i did a quick search and I did not find an abvious answer, so I'll let someone else answer .

Maybe it's for coreos/rpm-ostree#337 but i am not sure

@yummypeng
Copy link
Author

@jbtrystram, could you please provide an update on this issue? We're considering mounting the root filesystem read-only in our production Fedora CoreOS environment, and we need to fully understand the potential drawbacks before proceeding. What are the specific added risks associated with this change? A detailed explanation of the increased risks involved would be greatly appreciated. 🫶

@jbtrystram
Copy link
Contributor

jbtrystram commented Oct 17, 2024

As I mentioned, the root will be read-only by default in the next release through a composefs mount.
Do you need it sooner ?

@yummypeng
Copy link
Author

Okay, thanks for the feedback. Thing is, our product is still running on the older Fedora CoreOS 33, so I'm wondering what would happen if I changed rw to ro in the kernel cmdline on that version.

@dustymabe
Copy link
Member

Okay, thanks for the feedback. Thing is, our product is still running on the older Fedora CoreOS 33, so I'm wondering what would happen if I changed rw to ro in the kernel cmdline on that version.

You're running a 3.5 year old release with no security updates since 2021 so you might as well YOLO it and find out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants