3

The card itself doesn't seem damaged. I can read files and store them without troubles or errors. However, if I unmount and then mount it again all changes disappeared. I want to format it but the following doesn't work and the strange thing is that I receive no error. Note that I use the sd card through an adapter.

sudo umount /dev/mmcblk0p1
sudo mkfs.vfat -F32 -v /dev/mmcblk0p1 

This is the output of the last command.

mkfs.fat 4.1 (2017-01-24)
/dev/mmcblk0p1 has 4 heads and 16 sectors per track,
hidden sectors 0x2000;
logical sector size is 512,
using 0xf8 media descriptor, with 62543872 sectors;
drive number 0x80;
filesystem has 2 32-bit FATs and 32 sectors per cluster.
FAT size is 15264 sectors, and provides 1953541 clusters.
There are 32 reserved sectors.
Volume ID is 58e20b82, no volume label.

However, when I remount the sd nothing changed. I also tried with gparted but return an error and do nothing at all.

  • Every micro SD adapter has a slidable button on their side that will report the micro SD card inside them as read-only. Have you tried flipping this button? – HattinGokbori87 Jul 31 '18 at 11:39
  • @HattinGokbori87 Yep. I also tried flipping the button just to be sure. Nothing change at all. I mean that it seems read-only independently of the state of the button. – gvgramazio Jul 31 '18 at 11:43
  • @HattinGokbori87 I also tried this answer but with no result and no error message. Also, independently of the switch, the permission are rw-rw----. – gvgramazio Jul 31 '18 at 11:49
  • Sorry to hear your problem isn't solved. Just a a non-developer Ubuntu user so my plan stopped at the side button:-) Hoping someone can soon give you some answers. – HattinGokbori87 Jul 31 '18 at 19:25
  • A common failure mode for SD cards is to stop accepting new writes, sometimes silently. There may be SD card tools that can give you more details on the health of the card. – user10489 Oct 17 '21 at 16:21

1 Answers1

3

I have found this problem annoyingly often with microSD cards. First check for the obvious (e.g. software permissions/ownership and write-protect switch on the adapter - remember the switch is low quality, try moving back and forth a bit) and trying the hdparm -r option (software can set the hardware into read-only mode; see the hdparm man page; Windows has a corresponding software method too). If it still is read-only the reason probably is that the card itself has put itself in read-only mode due to some internal error (Google: "go read-only if it has not enough working flash cells to write").

If it is this hardware problem than no software solution can override the card's internal controller; tools like fdisk, mkfs and so on might appear to do their job, but when you remove the card and put it in again the state was exactly as it was before! (By the way: it is best NOT to reformat SD cards - see the Wikipedia: https://en.wikipedia.org/wiki/SD_card#Risks_of_reformatting)

I have also heard that some card readers can think a microSD card is write-protected if it isn't properly positioned (something to do with write-protect tabs at the side) but I've tried my faulty cards in 3 readers, pushed in snugly, without success, although other cards write without problems.

user235510
  • 91
  • 3