How to repair read-only USB devices

On Fedora, Debian & Ubuntu…

Rphl-Mstl
Tech notes and Geek stuff

--

Some MS-DOS formatted USB devices (FAT, vFat) may be mounted as read-only on Linux systems. You won’t be able to write on it. In order to fix this, follow these steps. Some commands may require administrator privileges.

1 : Plug in the USB device, it should be automatically mounted on the system, then list your drive with df -Th

➜ df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/nvme0n1p7 ext4 40G 22G 17G 57% /
/dev/nvme0n1p6 ext4 974M 307M 600M 34% /boot
/dev/nvme0n1p8 ext4 130G 40G 83G 33% /home
/dev/nvme0n1p1 vfat 599M 14M 585M 3% /boot/efi
/dev/sdb1 ext4 916G 324G 546G 38% /run/media/USB-DEVICE

2 : Identify your drive, for instance it could be:

Filesystem     Type     Mounted on
/dev/sdb1 vfat /run/media/USB-DEVICE

3 : Unmount it:

umount /run/media/USB-DEVICE

4 : We’ll use the dosfsck command to check and repair the filesystem:

dosfsck-a /dev/sdb1

5 : Once done, remove the USB drive and plug it in back to system.

Done!

--

--

Rphl-Mstl
Tech notes and Geek stuff

OS explorer, UI & UX passionate, Voxels crafter, code lover, Video Games player, Podcasts listener, Music amateur // Digital Publishing professional