Skip to main content
Topic: root-rw service fails because "Read only file system" (Read 532 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

root-rw service fails because "Read only file system"

As the title the root-rw service fails for me.
It thought it weird because
Code: [Select]
mount -o remount,rw /
when run manually works perfectly fine.

Then I commented the
Code: [Select]
logfile = /var/log/dinit/rootrw.log
in the service file and now it works.

So it seems it's trying to make a log file before the root is mounted rw. This is so strange, how can I be the first person with this issue?

Re: root-rw service fails because "Read only file system"

Reply #1
It seems the default is to mount the root filesystem read-write rather than read-only. At least, that's how it works on my Artix installation. Somehow on yours it's mounting root read-only instead. (I tend to think that's the better option).

How did you install Artix, how are you booting?

 

Re: root-rw service fails because "Read only file system"

Reply #2
I don't use dinit so may be off the mark but don't see how this can be correct ?
Code: [Select]
logfile = /var/log/dinit/rootrw.log
If the rootfs is still ro and the point of this service is to remount it rw how is dinit going to log to a ro /var/log ?

I notice in your github it's set to log to /run/rootrw.log
https://github.com/davmac314/dinit/blob/master/doc/linux/services/rootrw

Which as a tmpfs should work.

Re: root-rw service fails because "Read only file system"

Reply #3
I don't use dinit so may be off the mark but don't see how this can be correct ?
...
If the rootfs is still ro and the point of this service is to remount it rw how is dinit going to log to a ro /var/log ?

As I mentioned, it seems the default setup in Artix is for root to be read+write at initial boot (the initrd might do the usual filesystem check before mounting the root filesystem, but I don't know for sure if this is the case). In that case the "rootrw" service is somewhat redundant, though it can still serve as a marker for the point at which other services can be started, and of course the logfile specified shouldn't be an issue if the filesystem is already read+write. An Artix admin/dev may be able to clarify what the intention is.

Quote
I notice in your github it's set to log to /run/rootrw.log
https://github.com/davmac314/dinit/blob/master/doc/linux/services/rootrw

Which as a tmpfs should work.

Right. Another choice now is also to use "logtype = buffer" which keeps any output from the service in memory (you can see it via "dinitctl catlog" command).

Re: root-rw service fails because "Read only file system"

Reply #4
Curiosity got the better of me :)

/proc/cmdline from a fresh vm of artix-lxde-dinit-20230814-x86_64.iso shows grub does indeed set rw
Code: [Select]
BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=69b260ab-c62a-4374-b52e-06c9be889b8f rw net.ifnames=0 quiet

But if someone does a base install or similar they may run into this.

Re: root-rw service fails because "Read only file system"

Reply #5
I use ro root and separate /var, in such setup i don't encounter problems with dinit bootup
ARMtix

Re: root-rw service fails because "Read only file system"

Reply #6
Thank you for your replies. Yes in my setup I mount root read only.

Wouldn't it be a good idea to change the service so that it uses "logtype = buffer" as proposed by davmac?

Also: Why is mounting root rw the default in Artix?