Read-only file system 🐧 Linux

Read-only file system (EROFS) — cannot write to disk

The filesystem is mounted read-only — often because the kernel remounted it after detecting disk errors.

Seen on: Linux

Meaning

ext4 and others are mounted with errors=remount-ro: on I/O errors or corruption the kernel flips the disk to read-only to protect data. It can also be intentional (container readOnlyRootFilesystem, snap/squashfs, a read-only bind mount, or macOS system volume).

Common causes

  • Disk errors or filesystem corruption (kernel remounted ro)
  • Failing disk or cloud volume detached
  • Mounted ro on purpose (fstab, container, live USB)
  • Writing into a read-only path (snap, /usr on immutable distros)

⚡ Quick fix

  1. Check the kernel log: dmesg | grep -i 'remount\|I/O error'
  2. Back up data, then fsck the volume and remount rw
  3. If intentional, write to a writable path (volume, /tmp)

Detailed fix by platform

Linux

  1. bash
    dmesg -T | grep -iE 'remount|I/O error|EXT4-fs error' | tail
    mount | grep ' ro,'
    sudo mount -o remount,rw /

How to diagnose

  1. Kernel log — Errors before the remount?
  2. Disk health — smartctl -a /dev/sda
  3. Intentional — fstab/container settings

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.