Linux Troubleshooting
How to deal with specific problems I encountered in Linux.
How to fix Read-Only EXT4 drive
An external ext4 drive mounts as read-only in Linux usually because the kernel detected file system corruption or an improper unmount and switched it to read-only mode to prevent data loss. It can also be caused by hardware failure or root-only root directory permissions. [1, 2, 3, 4]
How to Fix and Troubleshoot
1. Identify the Drive Partition
Find your external drive's device name (e.g.,
/dev/sdb1 or /dev/sdc1):Run:
lsblk or df -h2. Unmount and Repair the File System
You must unmount the drive before running a file system check (
fsck):Unmount the drive:
sudo umount /dev/sdX1 (replace sdX1 with your actual partition)Repair errors:
sudo e2fsck -f /dev/sdX13. Remount as Read-Write
Once the repair finishes cleanly, mount it back normally: [1]
4. Fix Ownership Issues (If Not Corrupted)
If
fsck finds no errors but you still cannot write, the root folder of the drive likely belongs to the root user: [1]Mount the drive manually to a folder or navigate to its mount point.
Change ownership to your current user:
sudo chown -R $USER:$USER /path/to/mount/point