See https://github.com/containers/bootc/issues/971 TL;DR things work better if we don't use /etc/fstab for the root filesystem for bootc, but we use the root=<UUID> and rootflags= kernel arguments for the rootfs. There's also the case of /boot but that's less important. See https://github.com/containers/bootc/pull/417 where I did an elaborate workaround at the time and really should have filed this bug to get it fixed. Reproducible: Always
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`.