As the title the root-rw service fails for me.
It thought it weird because
mount -o remount,rw /
when run manually works perfectly fine.
Then I commented the
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?
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?
I don't use dinit so may be off the mark but don't see how this can be correct ?
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.
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.
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).
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
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.
I use ro root and separate /var, in such setup i don't encounter problems with dinit bootup
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?