Methods of payment Abuse

How to Fix a USB Drive That Mounts as Read-Only in Linux

16.06.2025, 17:34

If you’ve ever plugged a USB stick into a Linux system and suddenly realized you can’t copy, delete, or change anything because the drive is mounted as read-only — you’re not alone. This is a pretty common issue among Linux users, whether you're on Ubuntu, Fedora, Arch, or another distro.

There can be several reasons for this:
– The file system on the USB drive might be corrupted, especially if it was previously removed without being safely ejected.
 – Sometimes, Linux mounts a drive as read-only on purpose — to protect your data if it detects problems with the file system.
 – Some USB sticks have a physical write-protection switch, and it’s easy to forget it exists.
 – Or maybe you removed the USB drive from a Windows machine the wrong way, and now it’s in a "dirty" state that Linux refuses to touch.

The good news? Most of the time, you don’t need a new flash drive. With just a few commands, you can usually get it working again with full read/write access.

Here’s a step-by-step guide to help you figure out what’s wrong and fix it.

Step 1. Figure Out How the System Sees the USB

When you plug in a USB stick, Linux assigns it a device name like /dev/sdb or /dev/sdc, depending on what’s already connected.

You really want to make sure you identify the correct device before doing anything to it — messing with the wrong one can affect your internal drive and lead to bigger problems.

Open a terminal and run:

lsblk

This shows all storage devices connected to your system.

For more details, try:

sudo fdisk -l

Look for your USB drive in the list — it’s usually easy to spot by size or brand name.

Step 2. Check How the USB Is Mounted

When a USB drive is connected, Linux automatically mounts it — in other words, it links the file system to a folder (like /media/yourname/usb) so you can access its contents.

But if Linux sees a problem, it might mount the drive as read-only — to avoid making things worse.

To check this, run:

mount | grep /dev/sd

If you see ro in the output, the device is mounted read-only. If it says rw, then everything is fine.

To start fixing things, you’ll first need to unmount the USB:

sudo umount /dev/sdc1

(Replace sdc1 with whatever your device is.)

Step 3. Check the File System with fsck

The fsck tool is used in Linux to check and repair file system errors — similar to Windows’ chkdsk.

Linux often sets a USB drive to read-only when it detects corruption or problems with the file system.

To run a check:

sudo fsck -n /dev/sdc1

The -n flag tells it not to make changes yet — just to show what it finds. If everything looks okay or you’re ready to fix issues, run the command again without -n.

After that, try mounting the drive manually:

sudo mount /dev/sdc1 /mnt

Go to /mnt and try creating a file. If it works — great, you’re back in business.

Step 4. Try Remounting with Write Access

If your USB drive is still stuck in read-only mode, try manually remounting it with write permissions:

sudo mount -o remount,rw /dev/sdc1

If your drive is usually mounted under a specific folder (like /media/yourname/USB), make sure to remount it at that exact location.

Step 5. Check System Messages with dmesg

If none of the above steps helped, it's time to check the system logs. The dmesg command shows messages from the kernel — including any errors related to your USB drive.

Run:

dmesg | tail -n 50

Look for lines like:

EXT4-fs error (device sdc1): ...
Remounting filesystem read-only

If you see messages like these, it means Linux detected something serious — like file system corruption or bad sectors — and decided to automatically set the drive to read-only mode.

Step 6. Last Resort: Reformat the Drive

If nothing else works, you might have to reformat the USB stick. Warning: this will erase all data, so back up anything important if possible.

First, unmount the device:

sudo umount /dev/sdc1

Then pick the file system you want and format:

sudo mkfs.vfat /dev/sdc1   # for FAT32
sudo mkfs.ntfs /dev/sdc1   # for NTFS
sudo mkfs.ext4 /dev/sdc1   # for Linux ext4

Once formatting is done, mount the USB again:

sudo mount /dev/sdc1 /mnt

Try writing or deleting a file in /mnt to check if everything works.

Final Thoughts

When a USB drive mounts as read-only in Linux, it’s usually something you can fix — no need to panic. Checking the file system, remounting with write permissions, or reformatting the drive usually does the trick.

But if the issue keeps coming back, there’s a good chance the USB stick is physically failing. If that’s the case, back up anything important while you still can.