Skip to content

Add support for read-only /root #331

Closed

Description

@rmsc

Currently, ssh key injection assumes /root is writable, which might not always be the case.

I've worked around this for ephemeral runs by injecting a systemd mount unit for mounting tmpfs to /root/.ssh via --systemd-units. This leaves /root read-only, which keeps it close to the original image:

Unfortunately bcvk to-disk doesn't support --systemd-units, so it just gets stuck at Reached target sshd-keygen.target.

Maybe it might be useful to inject this unit by default, keeping .ssh in tmpfs? The unit itself is really simple:

[Unit]
Description=Transient BCVK Writable Root SSH Directory
DefaultDependencies=no
Conflicts=umount.target
Before=local-fs.target

[Mount]
What=tmpfs
Where=/root/.ssh
Type=tmpfs
Options=mode=0700,noatime,nodev,nosuid,noexec

[Install]
WantedBy=local-fs.target

Activity

  1. added
    agent/draft-workingThe drafter agent is actively working on this issue
    and removed
    agent/draft-workingThe drafter agent is actively working on this issue
    on Aug 25, 2026
  2. added
    agent/codeTriggers the drafter agent
    and removed
    agent/codeTriggers the drafter agent
    on Aug 26, 2026
  3. added
    agent/draft-workingThe drafter agent is actively working on this issue
    and removed
    agent/draft-workingThe drafter agent is actively working on this issue
    on Aug 26, 2026
  4. added 7 commits that reference this issue on Aug 27, 2026
    4b845a3
    51188cb
    e89ea6b
    61def53
    dda612b
    ac1fafc
    0f77b90
  5. added a commit that references this issue on Aug 28, 2026
    9109982
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/codeTriggers the drafter agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions