Skip to content

systemd-binfmt.service fails with "Read-only file system" on boot #41226

Closed

Description

Windows Version

Microsoft Windows [Version 10.0.26200.8973]

WSL Version

2.9.4.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

Linux version 6.18.35.2-microsoft-standard-WSL2

Distro Version

Ubuntu 26.04

Other Software

No response

Repro Steps

On every boot, systemd-binfmt.service and binfmt-support.service fail to write to /proc/sys/fs/binfmt_misc/status, logging repeated "Read-only file system" warnings — even though the root filesystem itself is mounted read-write.

Steps to Reproduce:

  1. Enable systemd in WSL ([boot] systemd=true in /etc/wsl.conf).
  2. Restart the distro: wsl --shutdown, then relaunch.
  3. Run:
journalctl -b | grep -i binfmt

Expected Behavior

systemd-binfmt.service should either succeed in registering/flushing binfmt_misc rules, or WSL's own interop layer (which appears to pre-register binfmt_misc handlers for Windows .exe interop) should mark the relevant entries in a way systemd-binfmt recognizes and skips gracefully, rather than failing with an exit code and logging repeated warnings.

Actual Behavior

Aug 01 19:44:38 Dimitris systemd[1]: Starting systemd-binfmt.service - Set Up Additional Binary Formats...
Aug 01 19:44:38 Dimitris systemd-binfmt[597]: Failed to flush binfmt_misc rules, ignoring: Read-only file system
Aug 01 19:44:38 Dimitris systemd[1]: systemd-binfmt.service: Main process exited, code=exited, status=1/FAILURE
Aug 01 19:44:38 Dimitris systemd[1]: systemd-binfmt.service: Failed with result 'exit-code'.
Aug 01 19:44:38 Dimitris systemd[1]: Failed to start systemd-binfmt.service - Set Up Additional Binary Formats.
Aug 01 19:44:38 Dimitris systemd[1]: Starting binfmt-support.service - Enable support for additional executable binary formats...
Aug 01 19:44:38 Dimitris update-binfmts[608]: update-binfmts: warning: unable to open /proc/sys/fs/binfmt_misc/status for writing: Read-only file system
Aug 01 19:44:38 Dimitris update-binfmts[608]: update-binfmts: warning: unable to open /proc/sys/fs/binfmt_misc/status for writing: Read-only file system
Aug 01 19:44:38 Dimitris update-binfmts[608]: update-binfmts: warning: unable to open /proc/sys/fs/binfmt_misc/status for writing: Read-only file system
Aug 01 19:44:38 Dimitris update-binfmts[608]: update-binfmts: warning: unable to open /proc/sys/fs/binfmt_misc/status for writing: Read-only file system
Aug 01 19:44:38 Dimitris systemd[1]: Finished binfmt-support.service - Enable support for additional executable binary formats.

Note that / itself is confirmed read-write at the time of failure:

/dev/sdd on / type ext4 (rw,relatime,discard,errors=remount-ro,data=ordered)

So the read-only condition is specific to /proc/sys/fs/binfmt_misc, not the root filesystem.

Diagnostic Logs

WslLogs-2026-08-01_20-32-10.tar.gz

Activity

  1. github-actions commented on Aug 1, 2026

    @github-actions
    Contributor

    No logs.etl found in the archive. Make sure that you ran collect-wsl-logs.ps1 as administrator and that the logs.etl file is in the archive.

    Diagnostic information
    appxpackage.txt not found
    optional-components.txt not found
    No logs.etl found in archive.
    Error while parsing the logs. See action page for details
    
  2. dhtzs commented on Aug 1, 2026

    @dhtzs
    ContributorAuthor
  3. github-actions commented on Aug 1, 2026

    @github-actions
    Contributor
    Diagnostic information
    Issue was edited and new log file was found: https://github.com/user-attachments/files/30620765/WslLogs-2026-08-01_20-32-10.tar.gz
    .wslconfig found
    Detected appx version: 2.9.4.0
    
  4. github-actions commented on Aug 1, 2026

    @github-actions
    Contributor
    Diagnostic information
    .wslconfig found
    Detected appx version: 2.9.4.0
    
  5. chemwolf6922 commented on Aug 4, 2026

    @chemwolf6922
    Contributor

    Hi Dimitris Chatzis (@dhtzs) .
    This was introduced by #40621 to fix the binfmt missing after distro termination issue.
    The systemd error is benign and won't affect registration of user defined binfmt settings. Please ignore it if it's not affecting any functions.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions