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.

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.