3

I have problem with a SD card which is Read Only (it's not due to the switch of the card adapter, I've already checked). I format the SD card with 'Disks' but the card results to be as "Read-only" and I can't change the permission see below.

enter image description here

I've tried some commands found online but nothing worked for me (I try these solutions: SD card is read only, MicroSD card is set to Read-only state. How can I write data on it? .) Here's the output of sudo fdkis -l:

Disk /dev/sda: 29,86 GiB, 32044482560 bytes, 62586880 sectors
Disk model: SD/MMC/MS PRO   
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x7fa28742

Device Boot Start End Sectors Size Id Type /dev/sda1 2048 62586879 62584832 29,9G c W95 FAT32 (LBA)

I'm using Ubuntu 20.04. It's not the first time that some devices turn to be as Read-only, but in the past I managed to solve the problem. Now, I don't know what to do. Is there a possibility to never get this problem again?

EDIT 1: mount | grep sda shows the following lines:

/dev/sda1 on /mnt/sda1 type vfat (rw,nosuid,nodev,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro,x-gvfs-show)

EDIT 2: I've tried to do sudo nautilus and then to change owne, group, others and actions of all them, but those changes are not saved since it said "you don't have the permissions necessary to...".

EDIT 3 I've also tried to format the sd card, but after that there's still the same problem.

EDIT 4 Incredibly, in Windows it works perfectly.

EDIT 5 The output of sudo umount /dev/sda1 and sudo dosfsck -a /dev/sda1 is:

fsck.fat 4.1 (2017-01-24)
/dev/sda1: 15 files, 45742/1954819 clusters
Nmath
  • 12,333
mcp
  • 61
  • 3
    Keep in mind that SD cards die eventually and this is one of the signs that it's dead or dying – Nmath Sep 20 '20 at 21:54
  • I usually get clues from messages when it is mounted (esp. given the command that mounts it). If you use GUI tools to mount, you'll need to view those messages in logs (if card not dead/dying, I'd expect it's an unclear file-system) – guiverc Sep 20 '20 at 21:59
  • The card is not dead because it worked until one hour ago... – mcp Sep 20 '20 at 22:10
  • What size SD card is it? The 1st generation SD cards have a read-only switch on the side. – Raffles Sep 20 '20 at 23:04
  • Could you update with mount | grep sda – Frobozz Sep 20 '20 at 23:55
  • Can you explain exactly what happens when you try to create a file or move a file to the volume? Your screenshot shows nothing out of place because root owns the mount point (/dev/sdx#)... This does not indicate that the SD card is read only. – Nmath Sep 21 '20 at 00:06
  • @Frobozz I've updated with what you told me. – mcp Sep 21 '20 at 06:38
  • @Nmath I cannot paste any file in the SD Card with right click. Also I cannot drag any file into the SD Card. – mcp Sep 21 '20 at 06:40
  • @Raffles I've already turned that switch on – mcp Sep 21 '20 at 06:41
  • You can analyze the problem according to this link, and if you are lucky make it work again. But the card might also be damaged 'beyond repair'. – sudodus Sep 21 '20 at 07:52
  • @sudodus that link doesn't solve the problem unofrtunately. I'm sure that the sd card life is not finished (two days ago I delete and move some files on it, but after removing it unsafely it does not work anymore) – mcp Sep 22 '20 at 18:07
  • Put it into a Windows computer. Windows will prompt you to repair the SD card if it is readable but damaged. – Raffles Sep 22 '20 at 18:27
  • @Raffles I've done what you says. After that, the SD card works fine on Windows but not in Ubuntu... – mcp Sep 22 '20 at 19:41
  • Try sudo umount /dev/sda1 and then sudo dosfsck -a /dev/sda1 Paste the result in your post. This could be a bug. – Raffles Sep 22 '20 at 21:43
  • 1
    @Raffles done it – mcp Sep 23 '20 at 15:07
  • Does it do the same thing with other SD cards? It would be useful to know if any other users are experiencing the same problem? – Raffles Sep 23 '20 at 17:27
  • 1
    @Raffles I will try with another SDASAP. What's seems strange is that initially the card worked also on Ubuntu. After an unsafely eject, it does not work properly anymore – mcp Sep 23 '20 at 18:16

1 Answers1

2

The following answer was submitted by the question's author who posted the answer as part of the question:


SOLUTION: I wipe the whole device with mkusb and then format the sd card in order to create a FAT partition. Now it works fine: I can paste and delete everything on it.

Nmath
  • 12,333