On Fri, May 03, 2024 at 07:33:32PM +0100, Ian Abbott wrote:
> If the root file system is initially mounted read-only, there is a possible
> race between rc-once.service and the systemd-remount-fs.service.  If
> rc-once.service sees the root filesystem is mounted read-only, then it will
> temporarily remount it read-write and later mount it read-only again.
> Meanwhile, systemd-remount-fs.service will also remount the root file system
> as specified by /etc/fstab which could be read-write. Depending on the
> ordering, it is possible for the root file-system to end up mounted
> read-only when it should have ended up mounted read-write.
> 
> As long as the two services do not run simultaneously, the root file system
> should end up mounted in the correct state.  However, I do not know what the
> intended order is supposed to be.  Perhaps it is intentionally
> system-dependent?

It's not intentional. I just never noticed because I always keep the rootfs
read-only by default. I think rc-once.service should have
'After=systemd-remount-fs.service'. That should fix the problem, right?

Michael

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Reply via email to