Error Codes Wiki

Linux Read-Only File System

Errorfilesystem

About Linux Read-Only File System

Linux "Read-only file system" (EROFS) means the filesystem has been mounted read-only or remounted read-only due to errors. This guide covers everything you need to know about this topic, including common causes, step-by-step solutions, and answers to frequently asked questions.

Here are the key things to understand: errno 30 — EROFS, cannot write to the filesystem. Filesystem may have been remounted RO due to errors. Common after kernel detects filesystem corruption. Snap/Flatpak containers have read-only rootfs. Understanding these fundamentals will help you diagnose and resolve this issue more effectively.

The most common reasons this occurs include: Filesystem corruption detected — kernel remounted RO. fstab entry specifying read-only mount. Hardware write-protect switch on USB/SD card. Container or snap filesystem isolation. Identifying the root cause is the first step toward finding the right solution.

To resolve this, follow these recommended steps: Check mount options: mount | grep /dev/sdX. Remount read-write: sudo mount -o remount,rw /. If corruption: unmount and run fsck. Check dmesg for filesystem error messages. If these steps do not resolve the issue, consider consulting additional resources or a qualified professional.

This article is part of our Linux Error Codes collection on Error Codes Wiki. We provide comprehensive, up-to-date information to help you find solutions quickly.

Quick Answer

Why did my filesystem go read-only?

The kernel detected errors and remounted read-only to prevent data damage.

Overview

Linux "Read-only file system" (EROFS) means the filesystem has been mounted read-only or remounted read-only due to errors.

Key Details

  • errno 30 — EROFS, cannot write to the filesystem
  • Filesystem may have been remounted RO due to errors
  • Common after kernel detects filesystem corruption
  • Snap/Flatpak containers have read-only rootfs

Common Causes

  • Filesystem corruption detected — kernel remounted RO
  • fstab entry specifying read-only mount
  • Hardware write-protect switch on USB/SD card
  • Container or snap filesystem isolation

Steps

  1. 1Check mount options: mount | grep /dev/sdX
  2. 2Remount read-write: sudo mount -o remount,rw /
  3. 3If corruption: unmount and run fsck
  4. 4Check dmesg for filesystem error messages

Tags

linuxfilesystemread only file systemtroubleshootingfix

More in Filesystem

Frequently Asked Questions

The kernel detected errors and remounted read-only to prevent data damage.