0

I am trying to mount my micro SD card but it shows write-protected. I have tried disabling using the notch on the adapter. I also ran the following commands:
lsblk -p

/dev/mmcblk0                    179:0    0  29.7G  1 disk 
├─/dev/mmcblk0p1                179:1    0  43.9M  1 part /media/somnath/boot
└─/dev/mmcblk0p2                179:2    0  29.7G  1 part 

I also tried using fdisk:

somnath@dell:~$ sudo fdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 29.74 GiB, 31914983424 bytes, 62333952 sectors
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: 0x1e020d01

Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 8192 98045 89854 43.9M c W95 FAT32 (LBA) /dev/mmcblk0p2 98304 62333951 62235648 29.7G 83 Linux

I tried formatting:

somnath@dell:~$ sudo mkfs.vfat -F32 -v /dev/mmcblk0 
mkfs.fat 4.1 (2017-01-24)
mkfs.vfat: unable to open /dev/mmcblk0: Device or resource busy

Here's the output from Disks: enter image description here

Somnath Rakshit
  • 151
  • 1
  • 11
  • 1
    You can try according to this link. Please notice that memory cards and USB pendrives are managed in the same way (as mass storage devices) by Linux except that the block device looks different when connected via PCI, for example /dev/mmcblk0p1. If still no luck, please try according to this link in order to get write permissions. – sudodus May 31 '21 at 06:26
  • 1
    The advice in the previous comment is for Microsoft file systems. If there is a Linux file system (for example ext4) you can use the commands chown and chmod to change ownership and permissions for files and directories like in an internal drive. – sudodus May 31 '21 at 06:30
  • 1
    Sometimes a file system is mounted read-only because it is damaged. You can try to repair it (ext file systems with e2fsck and Microsoft file systems with Windows). If there are still problems, there might be more severe problems. You should save whatever files that you do not want to lose (copy to another drive) and then try according to this link to analyze the problem. – sudodus May 31 '21 at 06:35

0 Answers0