0

I am trying to delete some files from my microSD card on my Ubuntu 16.04 (I am using MircoSD adapter in order to access my files). However the file system has been changed to 'read-only' and hence I can't delete the files in it.

I tried remounting it read-write (after I read it from here):

sudo mount -o remount,rw '/media/tuxication/MyDrive'

But it says:

mount: cannot remount rw read-write, is write-protected

I tried the other methods mentioned here but none seems to work.

Just to aid you with further details, if I want to format the microSD, it says:

Error wiping device: Command-line `wipefs -a "/dev/mmcblk0p1"' exited with non-zero exit status 1: 
 wipefs: error: /dev/mmcblk0p1: probing initialization failed: Read-only file system
 (udisks-error-quark, 0)

Any idea how I might solve this?

Organic Marble
  • 23,641
  • 15
  • 70
  • 122
  • 3
    Does your memory card have any tiny hardware switch which turns on write protection? – Byte Commander Sep 09 '16 at 21:45
  • 1
    Many adapters have a plastic switch that makes the card read only. If there is one, try to toggle it. – mikewhatever Sep 09 '16 at 21:45
  • And if there isn't a switch, then the adapter is more than likely bad. Try a different adapter or get an all-in-one memory card reader. – Terrance Sep 09 '16 at 21:46
  • @ByteCommander it does. I did unlock it before use. – jiltedpotato Sep 09 '16 at 21:48
  • @Terrance I don't own a all-in-one memory card reader. But I could purchase one though. Are you sure the problem is hardware related? – jiltedpotato Sep 09 '16 at 21:49
  • 1
    Every time it has happened to me it was because the adapter went bad. Most of those adapters are really cheaply made. I would determine if it was indeed a hardware issue by plugging it into another computer and verify it was read only. – Terrance Sep 09 '16 at 21:51
  • What make & model of computer, SD card reader and the SD card? – WinEunuuchs2Unix Sep 09 '16 at 21:52
  • Can you read the files OK? – WinEunuuchs2Unix Sep 09 '16 at 22:02
  • @WinEunuuchs2Unix yep I can read the files alright. – jiltedpotato Sep 09 '16 at 23:50
  • @Terrance Alright so finally this is where things stand. I removed the adapter and plugged into my Windows machine, it works perfectly fine and I can delete files from there with ease. So perhaps I might not need to change the file system anymore. However, I would still like to know the solution, if available. – jiltedpotato Sep 09 '16 at 23:50
  • Good that your adapter is still good. I am wondering if it works more easily in the all-in-one memory card reader is because that runs on the USB bus, but I am not sure what bus the SD card runs on. I have read where people are saying that it is dangerous and wrong to add your user to the disk group, but myself I have not had an issue with it. I guess you could try it and see. The command to add yourself to it is sudo usermod -a -G disk <username> – Terrance Sep 10 '16 at 00:01
  • Rather than mounting the adapter w/card yourself have you thought of just plugging it in, opening Nautilus and let it mount it? I do that with external drives and smartphones without any extra work on my part. It's worth a shot. – WinEunuuchs2Unix Sep 10 '16 at 00:23
  • Try to change disk permission, with "chown" and "chmod": chown USER:USER -R /dev/mmcblk0p1 && chmod 777 -R /dev/mmcblk0p1. – mohammads May 25 '18 at 18:25

1 Answers1

0

Try this:

Open a terminal,

Press Ctrl+Alt+T

Run it:

exec sudo -i
umount /dev/mmcblk0p1
dd if=/dev/zero of=/dev/mmcblk0p1 bs=1024
mkfs.vfat -F 32 /dev/mmcblk0p1 -I
kyodake
  • 15,401
  • It says: No command 'unmount' found, did you mean: Command 'umount' from package 'mount' (main) unmount: command not found – jiltedpotato Sep 10 '16 at 08:10