Re: Read-only rootfs on systemd [SOLVED]
Thanks for your help and the replies. So this issue is now resolved.
Summary of Issue:
Mounting root as read-only as documented in
(https://wiki.debian.org/ReadonlyRoot) because rootfs is busy.
Summary of Solution:
1. 'lsof +L1' showed cupsd getting stuck on /etc/passwd (deleted).
Looking at systemd journalctl, a custom service on this server was
creating users blindly on every startup due to a bug in the code logic
of this custom user management application. This caused /etc/passwd
to keep changing.
By fixing the bug, the /etc/passwd (deleted) was no longer an issue.
2. After reading the debian wiki on ReadOnlyRoot, there is a section on
samba creating a file /etc/samba/dhcp.conf everytime dhclient was
called. This server has a dual ethernet port with one port not
plugged. As a result, dhclient kept trying to get a lease for this
eth1 port and thus samba kept creating that file in /etc and rootfs
was always busy.
Not sure how this issue was solved but by adding the following line
to /etc/fstab, I don't see the repeated dhclient messages anymore:
tmpfs /tmp tmpfs nodev,nosuid 0 0
Reply to: