Artix Linux Forum

Init systems => runit => Topic started by: fungalnet on 07 May 2018, 10:05:34

Title: boot linux rw/ro and /tmpfs
Post by: fungalnet on 07 May 2018, 10:05:34
On the boot command to start the system with runit, should it be rw or ro?

Everything I have tried to read seems minimalistic in this respect and have not understood why or why not.  It seems to work with ro just as well.  Void uses ro, and lately I discovered that Obarun with s6 also prescribes ro.

Also does this somehow relate to utilizing a /tmpfs directly or indirectly with runit?
Title: Re: boot linux rw/ro and /tmpfs
Post by: konimex on 07 May 2018, 10:17:41
Either ro or rw should be fine. Personally I don't change it, but it seems the quirk of requiring "rw" as boot parameter is exclusive to systemd.

https://github.com/artix-linux/packages/blob/master/mkinitcpio/trunk/nosystemd.patch
Title: Re: boot linux rw/ro and /tmpfs
Post by: fungalnet on 07 May 2018, 11:16:38
Thank you, so I assume it is safe to use ro everywhere?
Title: Re: boot linux rw/ro and /tmpfs
Post by: konimex on 07 May 2018, 12:34:48
I think this is more about how a system is fsck-ed.

From what I got in this post (https://bbs.archlinux.org/viewtopic.php?pid=1307895#p1307895), if the kernel parameter is set to ro, init will do fsck. However, since by default mkinitcpio/initramfs included the fsck hook, setting the kernel parameter to ro will make it redundant because essentially you're running fsck twice. Of course, this depends on your setup.

It's safe for sure because you're double-checked your filesystem, but it is redundant.

CMIIW.
Title: Re: boot linux rw/ro and /tmpfs
Post by: fungalnet on 07 May 2018, 18:14:58
Thanks again, and I don't want to waste your time while I am still trying to figure it out, beyond the hooks and double fsck

Let's say the system is rw and is jeopardised, you have/trust an altered system to check on itself before it boots, and it finds itself OK, it doesn't really say much.  On the other hand can a ro system be altered just as well without noticing it?  I am pretty confident that the answer will be that it is just the same anyway.