void-linux / void-linux/void-runit

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

Open
#34 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
245
Forks
67
Avg merge
2d
Merged PRs (30d)
2

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with /etc/core-services/03-filesystems.sh around line 67 and inspect how the root filesystem remount failure reaches emergency_shell. Check the proposed /proc/cmdline handling and preserve the existing emergency behavior when read-only root is not explicitly requested. Done means a requested read-only root no longer drops to the emergency shell while normal root failures still do.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
operating-systems
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.