Bug 2332319
Summary: | Switch from /etc/fstab to root= and rootflags= (at least for bootc installs) | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Colin Walters <walters> |
Component: | anaconda | Assignee: | anaconda-maint |
Status: | NEW --- | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 42 | CC: | anaconda-maint, edu.redhat-bz, elavarde, jkonecny, kkoukiou, travier, voj-tech, w |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | Type: | --- | |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Colin Walters
2024-12-13 19:04:28 UTC
There are two workarounds here today: If you only have the default mount options in `/etc/fstab`, then you can just safely delete the line from `/etc/fstab`. If you have non-default mount options, then from an Anaconda installed system, run e.g. `rpm-ostree kargs --append=rootflags=<mount options>`. For example with Btrfs, one might set `rootflags=compress=zstd:1`. Then you can delete the `/etc/fstab` line. This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle. Changing version to 42. I think the path forward here, should be to have support for both. At least for a while. The question is what should be there... We already have rootflags https://github.com/rhinstaller/anaconda/blob/main/pyanaconda/modules/payloads/payload/rpm_ostree/installation.py#L581 for btrfs subvolumes but the question is what else should be there. Is rootflags related to fstab options or what values are supported? Ideally it would be for all options set for the root (/) mount point. For btrfs we have compression as well for example. See also: https://gitlab.com/fedora/ostree/sig/-/issues/72 > I think the path forward here, should be to have support for both. At least for a while. You mean write both /etc/fstab *and* synthesize a rootflags= kernel argument? That wouldn't really help as we'd still end up with a failing systemd-remount-fs. Or just make it configurable...somehow? My initial thought was we'd just do this by default for all ostree systems but given I think we actually do want this behavior elsewhere too, we should probably find a nice way to opt-in. One thing I could imagine here is we introduce /usr/share/anaconda/image-defaults.ks or something (or a toml/json/whatever) that can live in the target root. That content could come from e.g. fedora-release or a base container image config. > Ideally it would be for all options set for the root (/) mount point. For btrfs we have compression as well for example. Yes, to build on top of the above we need to stop using /etc/fstab for /, so it has to have all relevant mount options. I must admit that I probably don't oversee the big picture as you do, but isn't this a bit overkill? My solution to avoid the failing systemd-remount-fs is simply to add `ro` to the options of root aka / in `/etc/fstab`. |