systemd-remount-fs.service is dead after reboot if local mount unit is masked or empty, due to which root filesystem is mounted as read-only.
Issue
-
root file system is mounted in read-only mode during reboot, and multiple systemd services fails to start
with 'Read-only file system' errors in/var/log/messages
.Sep 22 00:44:15 hostname systemd-tmpfiles[1281]: fchmod() of /tmp failed: Read-only file system Sep 22 00:44:17 hostname systemd[1]: chronyd.service: Failed with result 'resources'. Sep 22 00:44:17 hostname systemd[1]: Failed to start NTP client/server. Sep 22 00:44:17 hostname systemd[1]: systemd-hostnamed.service: Failed to run 'start' task: Read-only file system Sep 22 00:44:17 hostname systemd[1]: systemd-hostnamed.service: Failed with result 'resources'. Sep 22 00:44:17 hostname systemd[1]: Failed to start Hostname Service. Sep 22 00:44:17 hostname systemd[1]: systemd-journal-upload.service: Failed to run 'start' task: Read-only file system Sep 22 00:44:42 hostname kdumpctl[1455]: mktemp: failed to create directory via template ‘/tmp/mkdumprd.XXXXXX’: Read-only file system Sep 22 00:44:48 hostname rc.local[1401]: hwclock: cannot open /etc/adjtime: Read-only file system Sep 22 00:44:48 hostname systemd[1]: chronyd.service: Failed to run 'start' task: Read-only file system
-
root file system remains read-only because
systemd-remount-fs.service
didn't execute, but nothing looks
wrong in the journal, even when booting at debug level;systemd-remount-fs
service is inactive and dead:# systemctl status systemd-remount-fs ● systemd-remount-fs.service - Remount Root and Kernel File Systems Loaded: loaded (/usr/lib/systemd/system/systemd-remount-fs.service; static; vendor preset: disabled) Active: inactive (dead) Docs: man:systemd-remount-fs.service(8) https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
Environment
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.