Ad Space — Top Banner

Read-Only File System

Linux Linux

Severity: Critical

What Does This Error Mean?

The 'Read-only file system' error means Linux has remounted your drive in read-only mode to prevent further damage. Linux automatically does this when it detects file system errors or I/O errors from the drive. This is a protective measure — it means your drive likely has file system corruption or a hardware problem that needs attention.

Affected Models

  • Ubuntu
  • Debian
  • Fedora
  • CentOS
  • Arch Linux
  • Linux Mint
  • Raspberry Pi OS

Common Causes

  • The drive has file system errors and Linux remounted it read-only to prevent further corruption
  • The storage device is physically failing and generating I/O errors
  • The system was shut down improperly (power cut) and the journal has not been replayed
  • For SD cards or USB drives — the write-protection tab is enabled or the media is worn out
  • A software bug or an interrupted kernel update triggered an emergency read-only remount

How to Fix It

  1. Check the system log for the cause. Run: sudo dmesg | grep -i error to see what triggered the read-only remount.

    The dmesg output shows hardware errors and file system messages. If you see 'I/O error' or 'hardware error,' the drive is likely failing.

  2. Attempt to remount read-write. Run: sudo mount -o remount,rw / This works if the filesystem was remounted due to a minor error and fsck cleaned it up.

    If this fails with more I/O errors, the drive is actively failing and you should not trust it. Back up immediately.

  3. Run fsck on the partition. Boot from a live USB. Run: sudo fsck -y /dev/sda1 (replace with your partition). This checks and repairs the file system.

    Always run fsck from a live USB so the partition being repaired is unmounted. Running fsck on a mounted partition can cause data loss.

  4. Check for a physical write-protect switch. For USB drives and SD cards, look for a small plastic tab on the side. If it is switched to the locked position, slide it back to the unlocked position.

    SD cards have a write-protect tab on the left side when you hold the card with the label facing you. The locked position is toward the bottom.

  5. Back up data before more repairs. If your important files are accessible in read-only mode, copy them to another drive immediately. Read-only mode means you can still read files — take advantage of this.

    Run: sudo cp -r /home/[username] /mnt/backup-drive/ to copy your home folder to an external backup drive.

When to Call a Professional

A read-only remount is Linux protecting your data from further damage. If fsck cannot repair the errors, the drive may be physically failing. Back up your data first, then have the drive evaluated by a professional. Do not continue using a drive that repeatedly remounts itself read-only.

Frequently Asked Questions

Why does Linux remount the filesystem read-only instead of just crashing?

Remounting read-only is much safer than crashing. In read-only mode, the kernel can continue running and you can still read your files and copy them to safety. A crash or forced shutdown on a filesystem with errors can cause much more data corruption.

The Raspberry Pi keeps going read-only. Is there a fix?

Raspberry Pi SD cards are particularly prone to this because SD cards wear out from frequent writes. The official Raspberry Pi OS has a read-only filesystem option for kiosk and server use. For a normal desktop setup, the best fix is to use a high-quality SD card (Samsung or SanDisk Endurance) or boot from a USB SSD instead.

I can read files but cannot write anything — how do I get my files off?

You are in the ideal recovery position — connect an external drive and copy your files. Run: lsblk to find the external drive. Mount it: sudo mount /dev/sdb1 /mnt/backup. Then copy: sudo cp -r /home/[username] /mnt/backup/ Copy everything important before attempting any repairs.