On a stable system I'm using openrc-0.19.1 and I have a /usr partition. I have an initrd which mount /usr before init start. Since many months (and many openrc versions), I can see the following messages at the very end of each reboot or shutdown sequences : * Remounting remaining filesystems read-only ... * Remounting /usr read only ... [!!] * failed because we are using /usr [!!] * Remounting / read only * ERROR: mount-ro failed to start Do you know a way to determine what's going on please ? Thanks.
Created attachment 424690 [details, diff] mount-ro.patch This patch makes mount-ro ignore /usr if it was not mounted by OpenRC. Please test and let me know if it fixes your issue. Thanks, William
Yes, the error is gone. Patch applied and got this : * Remounting remaining filesystems read-only ... * Remounting / read only [ok] But I know that some people are using some more complex setups with other pre-mounted mount points, for example, like /var. So /usr may not be the only mount point affected by this. Thanks !
(In reply to Fab from comment #2) > Yes, the error is gone. Patch applied and got this : > > * Remounting remaining filesystems read-only ... > * Remounting / read only [ok] > > But I know that some people are using some more complex setups with other > pre-mounted mount points, for example, like /var. So /usr may not be the > only mount point affected by this. This is a good point, so I'm now wondering if mount-ro should even try to do this, or if just running sync on the way down to flush everything to disk is sufficient?
If you ask it to me, my response would be « I don't know ». By coincidence, bug #573922 (and respective debate on -dev ML ) was opened. When I installed this system, udev was the default (eudev does not even exist), and anyway my politic was always to follow the default choice in virtual packages. I will wait for results, but in this particular case perhaps I will switch to eudev. This means that an initrd which pre-mounts /usr would no longer be mandatory, so I could simply get rid of my initrd and this bug should automagically vanish.
(In reply to Fab from comment #4) *snip* > When I installed this system, udev was the default (eudev does not even > exist), and anyway my politic was always to follow the default choice in > virtual packages. I will wait for results, but in this particular case > perhaps I will switch to eudev. > > This means that an initrd which pre-mounts /usr would no longer be > mandatory, so I could simply get rid of my initrd and this bug should > automagically vanish. That's a misconception, because the system guys happened to mention it first. Udev has nothing to do with the initramfs pre-mounting /usr. Systemd was the first major package to tell you about it, but splitting / from /usr is definitely not a good idea for many reasons without an initramfs, so please do not think that switching to eudev will make that a non-issue.
In case this is useful, systemd has addressed this issue in part by letting the initramfs unmount /usr and / if possible. I know this is the behavior when using dracut. I don't know the details of how this is coordianted between the initramfs and systemd, but we obviously control genkernel and I suspect that dracut would accept patches if necessary to enable this kind of support for openrc. This allows both root and /usr to be unmounted cleanly, whether read-only or otherwise.
@rich0: I think you are talking about bug #524404, which is a fix for sysvinit. I haven't looked into it heavily, but the idea is that, as the last step of going down, sysvinit should exec another process in its place that shuts everything down and remounts all mounted file systems read only.
I have the same issue. Seperate /usr that is mounted in initramfs and on reboot or shutdown the error message is displayed unable to mount /usr read only. I tried the patch and the Error message went away. It appears that this is only suppressing the error message and that /usr is not remounted read-only for a clean shutdown? Is this something that openrc needs to handle or the initramfs should mount unmount so openrc can mount it at boot runlevel?
*** Bug 577530 has been marked as a duplicate of this bug. ***
https://github.com/openrc/openrc/commit/bf539f2 This will skip the remounting of /usr ro if /usr was premounted. I will include it in 0.23 and backport to 0.22.3.