Saturday, 1 June 2019

Fixing a read only USB drive

I discovered that putting a USB drive into my Linux Mint PC resulted in it being read-only. After a little bit of googling I discovered a simple fix. It turned out that a minor corruption was the culprit.

First login as root:
$ sudo su -
<enter root password>

Find the drive with:
$ df -Th

In my case it was: /media/martin/735F-4AA5 and also note where it is mounted, in my case /dev/sdd1 

So unmount it:
$ umount /media/martin/735F-4AA5


Find and fix any corruption: 
$ dosfsck -a /dev/sdd1 


Open the folder and look for a file starting with FSCK and ending with .REC.
Hint: It's likely called FSCK0000.REC
Now delete (move to trash) the file and then mount the drive and all should be good.

Simple :-)