Root filesystem is readonly after booting the system
This document (000021843) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server, all versions
Situation
System is installed from a image or with AutoYaST2 or any other installation helper.
After booting the system for the first time a number of issues is noticed.
In the case reported, the root filesystem always remained readonly after boot and would have had to be remounted rw.
Many commands were not available.
Resolution
Make sure no misspelled mountpoints exist, esp /usr is crucial, as the majority of command mandatory for setting up the system live in and below there.
Cause
It was noticed the system had a non-printable character in /etc/fstab for the /urs mountpoint
#==[ Configuration File ]===========================#
# /etc/fstab
...
/dev/systemvg/lv-usr /usr\040 xfs defaults 0 0
Systemd uses a unit generator to create mount units for all filesystems in fstab.
With the above it creates a irregular usr\x20.mount unit and fails to create the needed and hardcoded usr.mount.
# /bin/systemctl show 'usr.mount' | sort
Description=usr.mount
Id=usr.mount
LoadError=org.freedesktop.systemd1.NoSuchUnit "Unit usr.mount not found."
Names=usr.mount
# /bin/systemctl show 'usr\x20.mount' | sort
FragmentPath=/run/systemd/generator/usr\x20.mount
Id=usr\x20.mount
LoadError=org.freedesktop.systemd1.BadUnitSetting "Unit usr\x20.mount has a bad unit file setting."
Names="usr\\x20.mount"
This breaks and lets fail the local-fs.target which is responsible for remounting the filesystems when switching from the initrd over to the rootfs.
e.g.:
May 07 10:32:16 localhost systemd[1]: local-fs.target: Cannot add dependency job, ignoring: Unit usr\x20.mount has a bad unit file setting.
This results in a number of issues, like the rootfs being mounted readonly, hostname cannot be set and some others.
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000021843
- Creation Date: 20-May-2025
- Modified Date:20-May-2025
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com