void-runit icon indicating copy to clipboard operation
void-runit copied to clipboard

core-services/03-filesystems.sh drops to emergency shell if root is read-only, even if this is desired behavior

Open AbsolutelyLudicrous opened this issue 5 years ago • 2 comments

Greetings!

I've been building a Void-ish system using a read-only squashfs root filesystem. Unfortunately, the script /etc/core-services/03-filesystems.sh, at line 67, drops to an emergency shell if root cannot be mounted read-write.

This makes sense for the majority of desktop and server use cases, but for some embedded devices and some desktops/servers, having a read-only rootfs makes sense.

Proposal: have core-services/03-filesystems.sh check if /proc/cmdline contains ro, or readonly, or ro=true, or some such string, to support a wider range of use cases.


My temporary solution is to just remove the || emergency_shell from line 67, but this is undesirable because I wish to stay as close to upstream as possible

AbsolutelyLudicrous avatar Dec 28 '19 18:12 AbsolutelyLudicrous

ro is a default kernel cmdline flag for majority of setups though, it mounts the root read-only and then it's the target system's job to remount it as rw.

q66 avatar Dec 28 '19 18:12 q66