11

I have read-only usb drive and could not fix it. I have read some articles about it and tried to fix but I couldn't.

I unmounted drive and used dosfsck to check and repair MS-DOS filesystems, because it is FAT filesystem and run:

dosfsck -a /dev/sdb1

it gave the output:

fsck.fat 4.1 (2017-01-24) open: Read-only file system

So what can I do with it? Can I repair or it's time to throw it in a trash?

godot
  • 165
  • 1
  • 2
  • 11
  • where did the USB come from: some USBs -are- read only. Often when those are commercial those USB are hardware locked. 2. Some USB have a hardware lock on the outside.
  • – Rinzwind Feb 10 '18 at 12:31
  • this usb was worked normally and once it became read-only. I think during monting or unmounting – godot Feb 10 '18 at 12:41
  • Can you add the output of dmesg when you insert the USB? – Katu Feb 16 '18 at 13:59
  • what is dmesg?? – godot Feb 16 '18 at 14:51
  • Maybe the tips in the following link will help, https://askubuntu.com/questions/144852/cant-format-my-usb-drive-i-have-already-tried-with-mkdosfs-and-gparted/933035#933035 – sudodus Feb 16 '18 at 15:12
  • USB drives can be fickle... best to try @sudodus linked answer – Robert Riedl Feb 16 '18 at 15:47
  • At a command promt type "mount". Where is the USB driver mounted ? (example /media/myname/mountpoint). What are the permissions of /media/myname/mountpoint ? Is the mountpoint owned by root ? – hatterman Feb 21 '18 at 14:06
  • Could you please [edit] your question to include the output of dmesg | tail -n 100 shortly after connecting the USB storage? Also cat /sys/block/sd?/ro (replace ? with the appropriate device name letter) allows you to check if the storage itself or only the file system thereon is read-only. – David Foerster Feb 21 '18 at 15:00
  • Similar issue: https://unix.stackexchange.com/questions/308009/cant-delete-from-sd-card-read-only-file-system/612217#612217 – EsmaeelE Sep 30 '20 at 15:59