Repository navigation
Description
Summary
On an Anaconda-installed system whose / entry in /etc/fstab already has ro, bootc-fstab-edit.service runs on every boot. It rewrites /etc/fstab and logs "Updated /etc/fstab to add ro for /", but changes nothing, and never writes its # Updated by bootc-fstab-edit.service marker. So the generator enables it again on the next boot, indefinitely.
Environment
- Anatase Linux 20261019.8 (Fedora 45 based bootc image; booted from a derived image built on it), installed with Anaconda, Btrfs on LUKS2, composefs.
bootc --version: bootc 1.16.13
How it happens (from main, read 28 Oct 2026)
- The installer writes
/etc/fstabwith the# Created by anacondaheader, and the/line already containsro, mid-list:UUID=… / btrfs subvol=root,compress=zstd:1,ro,… 0 0. generator.rs→fstab_generator_impl: there's noBOOTC_EDITED_STAMPline, and there is the Anaconda stamp, so it callsgenerate_fstab_editorand enablesbootc-fstab-edit.service.deploy.rs→fixup_etc_fstab/edit_fstab_line: the/line already hasro, so it's passed through unchanged and no stamp is written (the stamp is only written above a line it modifies). But the file is still replaced viaatomic_replace_with, and "Updated /etc/fstab to addrofor/" is printed unconditionally.- Next boot: still no stamp → step 2 again.
Observed
journalctl -u bootc-fstab-edit.serviceshows "Updated /etc/fstab to addrofor/" on a plain reboot and again after an image update, with the file's content identical before and after./etc/fstabgets a new mtime on every boot, sosystemctlandmountprint the "/etc/fstab has been modified on disk, systemd still uses the old version; run systemctl daemon-reload" hint after each boot.- Mounts are unaffected; it's noise plus a misleading log line.
Workaround (confirmed)
Append the marker comment yourself:
# Updated by bootc-fstab-edit.service
After the next reboot journalctl -b -u bootc-fstab-edit.service has no entries, the fstab mtime stays put and the daemon-reload hint is gone.
Suggested fix
In fixup_etc_fstab, track whether any line was edited. If none was: don't rewrite the file and don't print "Updated…", but do write the stamp (or otherwise record that the check ran) so the generator stops enabling the unit. Alternatively, have fstab_generator_impl skip when the / entry already has ro.
Possibly related but different: #971 (root mount options under composefs).
Activity
cgwalters commentedon Oct 27, 2026
I think this is the right fix
Boot state, fstab fix in the image, anatase-snap in /usr/bin
generator: skip fstab editor for read-only root
generator: skip fstab editor for read-only root
generator: skip fstab editor for read-only root
Skip bootc's fstab edit when / already has ro, so mounts stop warning