Can't delete from SD card, 'Read-only file system'Error mounting a CF cardFile system that never breaks (data loss acceptable)mounting a SD card without a partitionCan't mount SD card - Wrong filesystemHow to create a new partitioning table on SD card from the command line ?How to finally mount FAT16 USB flash driveconverting partition on the SD card to FATCan't remove a file in a partition in SD cardHow does the kernel decide to make an SD card filesystem read-only?Why does my SD card change to readonly when I mounted it as readwrite?

What is it called when one voice type sings a 'solo'?

How can I fix this gap between bookcases I made?

Is domain driven design an anti-SQL pattern?

When blogging recipes, how can I support both readers who want the narrative/journey and ones who want the printer-friendly recipe?

Finding files for which a command fails

Prime joint compound before latex paint?

Manga about a female worker who got dragged into another world together with this high school girl and she was just told she's not needed anymore

Email Account under attack (really) - anything I can do?

Could Giant Ground Sloths have been a good pack animal for the ancient Mayans?

Lied on resume at previous job

What do the Banks children have against barley water?

Is it legal to have the "// (c) 2019 John Smith" header in all files when there are hundreds of contributors?

What are the advantages and disadvantages of running one shots compared to campaigns?

Why airport relocation isn't done gradually?

aging parents with no investments

Can a planet have a different gravitational pull depending on its location in orbit around its sun?

Why was the "bread communication" in the arena of Catching Fire left out in the movie?

Need help identifying/translating a plaque in Tangier, Morocco

Landlord wants to switch my lease to a "Land contract" to "get back at the city"

Domain expired, GoDaddy holds it and is asking more money

map list to bin numbers

Pristine Bit Checking

What is the meaning of "of trouble" in the following sentence?

What is the offset in a seaplane's hull?



Can't delete from SD card, 'Read-only file system'


Error mounting a CF cardFile system that never breaks (data loss acceptable)mounting a SD card without a partitionCan't mount SD card - Wrong filesystemHow to create a new partitioning table on SD card from the command line ?How to finally mount FAT16 USB flash driveconverting partition on the SD card to FATCan't remove a file in a partition in SD cardHow does the kernel decide to make an SD card filesystem read-only?Why does my SD card change to readonly when I mounted it as readwrite?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I'm using Ubuntu 14.04.



I have an SD card that I use with my camera, and I'm trying to delete photos from it. I was able to move them to the Trash, but when I try to delete any of the files out of the Trash I get Failed to delete the item from the trash.



I can navigate to the .Trash-1000/files directory on the device, but when I try to sudo rm the files, I get rm: cannot remove ‘IMG_1483.JPG’: Read-only file system.



mount gives me this:



/dev/sdb1 on /media/zack/6562-61611 type vfat (ro,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)


I tried re-mounting the device using sudo mount /dev/sdb1 /media/zack/SD -o rw,dmask=0000 and got the same error when I tried to delete the files.



Finally, I have checked the switch on the card itself and confirmed it's in the unlocked position. I tried switching it to locked just in case it was a goofy card and I couldn't delete off of it then either.



What's going on here? How can I get rid of these files?



Update 1: I tried a couple other things in response to aventurin's comment. I took a new picture, then tried to sudo rm it and that worked. When I went back to .Trash-1000/files and tried it again, I was able to delete some files but not others:



$ ls
100___12
101___01
102___02 # directories
103___03
...
IMG_1365.JPG
IMG_1374.JPG
IMG_1375.JPG
IMG_1380.JPG
...

$ sudo rm -rvf *.JPG
removed ‘IMG_1365.JPG’
removed ‘IMG_1374.JPG’
removed ‘IMG_1375.JPG’
rm: cannot remove ‘IMG_1380.JPG’: Read-only file system
rm: cannot remove ‘IMG_1381.JPG’: Read-only file system
rm: cannot remove ‘IMG_1383.JPG’: Read-only file system
...


...and so on. I did an ll right before I deleted those files, and the permissions for all of the .JPG files look exactly the same.



Update 2:



$ dmesg | grep sdb1
[ 714.950034] FAT-fs (sdb1): error, invalid access to FAT (entry 0x6ce0c8c0)
... # a bunch more of those
[ 2192.017345] FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 2192.663466] sdb1: rw=0, want=105540772768, limit=62325760
[ 2192.663470] sdb1: rw=0, want=105540772744, limit=62325760
[ 2192.663499] FAT-fs (sdb1): error, invalid access to FAT (entry 0xad23600b)
[ 2192.663501] FAT-fs (sdb1): Filesystem has been set read-only
[ 2192.663601] FAT-fs (sdb1): error, invalid access to FAT (entry 0x58f3a807)
[ 2271.537913] sdb: sdb1
[ 2273.782060] FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 2407.374492] FAT-fs (sdb1): error, fat_free_clusters: deleting FAT entry beyond EOF
[ 2407.374496] FAT-fs (sdb1): Filesystem has been set read-only


I tried sudo fsck /dev/sdb1 and got a lot of errors:



0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
1) Remove dirty bit
2) No action
? 1
...
/.Trash-1000/files/IMG_1483.JPG and
/.Trash-1000/files/117___09/IMG_1737.JPG
share clusters.
1) Truncate first to 5439488 bytes
2) Truncate second to 0 bytes
? 1


I told it to fix them all, but when I run it again they all show up again.



Update 3:



I unmounted the card, and ran sudo fsck /dev/sdb1 -a. It ran for about 6 hours and still wasn't finished so I eventually Ctrl-C'd it. It mostly seemed to be renaming files with corruped usernames, and was up to almost 18000 files renamed before I killed it (I've certainly never taken that many photos before...).



I then tried sudo mount /dev/sdb1 /media/zack/SD -v -o rw and got this output:



$ sudo mount /dev/sdb1 /media/zack/SD -v -o rw
mount: you didn't specify a filesystem type for /dev/sdb1
I will try type vfat
/dev/sdb1 on /media/zack/SD type vfat (rw)


Despite not having an error, I still cannot delete the files and get the same old "read-only file system" error.










share|improve this question
























  • Does rm as root work? Does rm work for files not in trash?

    – aventurin
    Sep 5 '16 at 16:57











  • @aventurin, sorry, I should have specified that I was using sudo for just about everything. I've updated the question with that change, as well as the results of your second suggestion.

    – Zack
    Sep 5 '16 at 17:13











  • Does dmesg show any errors related to the SD card?

    – aventurin
    Sep 5 '16 at 17:19











  • @aventurin, updated the question again.

    – Zack
    Sep 5 '16 at 17:28






  • 1





    Some SD cards have an mechanical RW lock. Does yours?

    – Serge
    Sep 5 '16 at 19:05

















1















I'm using Ubuntu 14.04.



I have an SD card that I use with my camera, and I'm trying to delete photos from it. I was able to move them to the Trash, but when I try to delete any of the files out of the Trash I get Failed to delete the item from the trash.



I can navigate to the .Trash-1000/files directory on the device, but when I try to sudo rm the files, I get rm: cannot remove ‘IMG_1483.JPG’: Read-only file system.



mount gives me this:



/dev/sdb1 on /media/zack/6562-61611 type vfat (ro,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)


I tried re-mounting the device using sudo mount /dev/sdb1 /media/zack/SD -o rw,dmask=0000 and got the same error when I tried to delete the files.



Finally, I have checked the switch on the card itself and confirmed it's in the unlocked position. I tried switching it to locked just in case it was a goofy card and I couldn't delete off of it then either.



What's going on here? How can I get rid of these files?



Update 1: I tried a couple other things in response to aventurin's comment. I took a new picture, then tried to sudo rm it and that worked. When I went back to .Trash-1000/files and tried it again, I was able to delete some files but not others:



$ ls
100___12
101___01
102___02 # directories
103___03
...
IMG_1365.JPG
IMG_1374.JPG
IMG_1375.JPG
IMG_1380.JPG
...

$ sudo rm -rvf *.JPG
removed ‘IMG_1365.JPG’
removed ‘IMG_1374.JPG’
removed ‘IMG_1375.JPG’
rm: cannot remove ‘IMG_1380.JPG’: Read-only file system
rm: cannot remove ‘IMG_1381.JPG’: Read-only file system
rm: cannot remove ‘IMG_1383.JPG’: Read-only file system
...


...and so on. I did an ll right before I deleted those files, and the permissions for all of the .JPG files look exactly the same.



Update 2:



$ dmesg | grep sdb1
[ 714.950034] FAT-fs (sdb1): error, invalid access to FAT (entry 0x6ce0c8c0)
... # a bunch more of those
[ 2192.017345] FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 2192.663466] sdb1: rw=0, want=105540772768, limit=62325760
[ 2192.663470] sdb1: rw=0, want=105540772744, limit=62325760
[ 2192.663499] FAT-fs (sdb1): error, invalid access to FAT (entry 0xad23600b)
[ 2192.663501] FAT-fs (sdb1): Filesystem has been set read-only
[ 2192.663601] FAT-fs (sdb1): error, invalid access to FAT (entry 0x58f3a807)
[ 2271.537913] sdb: sdb1
[ 2273.782060] FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 2407.374492] FAT-fs (sdb1): error, fat_free_clusters: deleting FAT entry beyond EOF
[ 2407.374496] FAT-fs (sdb1): Filesystem has been set read-only


I tried sudo fsck /dev/sdb1 and got a lot of errors:



0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
1) Remove dirty bit
2) No action
? 1
...
/.Trash-1000/files/IMG_1483.JPG and
/.Trash-1000/files/117___09/IMG_1737.JPG
share clusters.
1) Truncate first to 5439488 bytes
2) Truncate second to 0 bytes
? 1


I told it to fix them all, but when I run it again they all show up again.



Update 3:



I unmounted the card, and ran sudo fsck /dev/sdb1 -a. It ran for about 6 hours and still wasn't finished so I eventually Ctrl-C'd it. It mostly seemed to be renaming files with corruped usernames, and was up to almost 18000 files renamed before I killed it (I've certainly never taken that many photos before...).



I then tried sudo mount /dev/sdb1 /media/zack/SD -v -o rw and got this output:



$ sudo mount /dev/sdb1 /media/zack/SD -v -o rw
mount: you didn't specify a filesystem type for /dev/sdb1
I will try type vfat
/dev/sdb1 on /media/zack/SD type vfat (rw)


Despite not having an error, I still cannot delete the files and get the same old "read-only file system" error.










share|improve this question
























  • Does rm as root work? Does rm work for files not in trash?

    – aventurin
    Sep 5 '16 at 16:57











  • @aventurin, sorry, I should have specified that I was using sudo for just about everything. I've updated the question with that change, as well as the results of your second suggestion.

    – Zack
    Sep 5 '16 at 17:13











  • Does dmesg show any errors related to the SD card?

    – aventurin
    Sep 5 '16 at 17:19











  • @aventurin, updated the question again.

    – Zack
    Sep 5 '16 at 17:28






  • 1





    Some SD cards have an mechanical RW lock. Does yours?

    – Serge
    Sep 5 '16 at 19:05













1












1








1


1






I'm using Ubuntu 14.04.



I have an SD card that I use with my camera, and I'm trying to delete photos from it. I was able to move them to the Trash, but when I try to delete any of the files out of the Trash I get Failed to delete the item from the trash.



I can navigate to the .Trash-1000/files directory on the device, but when I try to sudo rm the files, I get rm: cannot remove ‘IMG_1483.JPG’: Read-only file system.



mount gives me this:



/dev/sdb1 on /media/zack/6562-61611 type vfat (ro,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)


I tried re-mounting the device using sudo mount /dev/sdb1 /media/zack/SD -o rw,dmask=0000 and got the same error when I tried to delete the files.



Finally, I have checked the switch on the card itself and confirmed it's in the unlocked position. I tried switching it to locked just in case it was a goofy card and I couldn't delete off of it then either.



What's going on here? How can I get rid of these files?



Update 1: I tried a couple other things in response to aventurin's comment. I took a new picture, then tried to sudo rm it and that worked. When I went back to .Trash-1000/files and tried it again, I was able to delete some files but not others:



$ ls
100___12
101___01
102___02 # directories
103___03
...
IMG_1365.JPG
IMG_1374.JPG
IMG_1375.JPG
IMG_1380.JPG
...

$ sudo rm -rvf *.JPG
removed ‘IMG_1365.JPG’
removed ‘IMG_1374.JPG’
removed ‘IMG_1375.JPG’
rm: cannot remove ‘IMG_1380.JPG’: Read-only file system
rm: cannot remove ‘IMG_1381.JPG’: Read-only file system
rm: cannot remove ‘IMG_1383.JPG’: Read-only file system
...


...and so on. I did an ll right before I deleted those files, and the permissions for all of the .JPG files look exactly the same.



Update 2:



$ dmesg | grep sdb1
[ 714.950034] FAT-fs (sdb1): error, invalid access to FAT (entry 0x6ce0c8c0)
... # a bunch more of those
[ 2192.017345] FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 2192.663466] sdb1: rw=0, want=105540772768, limit=62325760
[ 2192.663470] sdb1: rw=0, want=105540772744, limit=62325760
[ 2192.663499] FAT-fs (sdb1): error, invalid access to FAT (entry 0xad23600b)
[ 2192.663501] FAT-fs (sdb1): Filesystem has been set read-only
[ 2192.663601] FAT-fs (sdb1): error, invalid access to FAT (entry 0x58f3a807)
[ 2271.537913] sdb: sdb1
[ 2273.782060] FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 2407.374492] FAT-fs (sdb1): error, fat_free_clusters: deleting FAT entry beyond EOF
[ 2407.374496] FAT-fs (sdb1): Filesystem has been set read-only


I tried sudo fsck /dev/sdb1 and got a lot of errors:



0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
1) Remove dirty bit
2) No action
? 1
...
/.Trash-1000/files/IMG_1483.JPG and
/.Trash-1000/files/117___09/IMG_1737.JPG
share clusters.
1) Truncate first to 5439488 bytes
2) Truncate second to 0 bytes
? 1


I told it to fix them all, but when I run it again they all show up again.



Update 3:



I unmounted the card, and ran sudo fsck /dev/sdb1 -a. It ran for about 6 hours and still wasn't finished so I eventually Ctrl-C'd it. It mostly seemed to be renaming files with corruped usernames, and was up to almost 18000 files renamed before I killed it (I've certainly never taken that many photos before...).



I then tried sudo mount /dev/sdb1 /media/zack/SD -v -o rw and got this output:



$ sudo mount /dev/sdb1 /media/zack/SD -v -o rw
mount: you didn't specify a filesystem type for /dev/sdb1
I will try type vfat
/dev/sdb1 on /media/zack/SD type vfat (rw)


Despite not having an error, I still cannot delete the files and get the same old "read-only file system" error.










share|improve this question
















I'm using Ubuntu 14.04.



I have an SD card that I use with my camera, and I'm trying to delete photos from it. I was able to move them to the Trash, but when I try to delete any of the files out of the Trash I get Failed to delete the item from the trash.



I can navigate to the .Trash-1000/files directory on the device, but when I try to sudo rm the files, I get rm: cannot remove ‘IMG_1483.JPG’: Read-only file system.



mount gives me this:



/dev/sdb1 on /media/zack/6562-61611 type vfat (ro,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)


I tried re-mounting the device using sudo mount /dev/sdb1 /media/zack/SD -o rw,dmask=0000 and got the same error when I tried to delete the files.



Finally, I have checked the switch on the card itself and confirmed it's in the unlocked position. I tried switching it to locked just in case it was a goofy card and I couldn't delete off of it then either.



What's going on here? How can I get rid of these files?



Update 1: I tried a couple other things in response to aventurin's comment. I took a new picture, then tried to sudo rm it and that worked. When I went back to .Trash-1000/files and tried it again, I was able to delete some files but not others:



$ ls
100___12
101___01
102___02 # directories
103___03
...
IMG_1365.JPG
IMG_1374.JPG
IMG_1375.JPG
IMG_1380.JPG
...

$ sudo rm -rvf *.JPG
removed ‘IMG_1365.JPG’
removed ‘IMG_1374.JPG’
removed ‘IMG_1375.JPG’
rm: cannot remove ‘IMG_1380.JPG’: Read-only file system
rm: cannot remove ‘IMG_1381.JPG’: Read-only file system
rm: cannot remove ‘IMG_1383.JPG’: Read-only file system
...


...and so on. I did an ll right before I deleted those files, and the permissions for all of the .JPG files look exactly the same.



Update 2:



$ dmesg | grep sdb1
[ 714.950034] FAT-fs (sdb1): error, invalid access to FAT (entry 0x6ce0c8c0)
... # a bunch more of those
[ 2192.017345] FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 2192.663466] sdb1: rw=0, want=105540772768, limit=62325760
[ 2192.663470] sdb1: rw=0, want=105540772744, limit=62325760
[ 2192.663499] FAT-fs (sdb1): error, invalid access to FAT (entry 0xad23600b)
[ 2192.663501] FAT-fs (sdb1): Filesystem has been set read-only
[ 2192.663601] FAT-fs (sdb1): error, invalid access to FAT (entry 0x58f3a807)
[ 2271.537913] sdb: sdb1
[ 2273.782060] FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 2407.374492] FAT-fs (sdb1): error, fat_free_clusters: deleting FAT entry beyond EOF
[ 2407.374496] FAT-fs (sdb1): Filesystem has been set read-only


I tried sudo fsck /dev/sdb1 and got a lot of errors:



0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
1) Remove dirty bit
2) No action
? 1
...
/.Trash-1000/files/IMG_1483.JPG and
/.Trash-1000/files/117___09/IMG_1737.JPG
share clusters.
1) Truncate first to 5439488 bytes
2) Truncate second to 0 bytes
? 1


I told it to fix them all, but when I run it again they all show up again.



Update 3:



I unmounted the card, and ran sudo fsck /dev/sdb1 -a. It ran for about 6 hours and still wasn't finished so I eventually Ctrl-C'd it. It mostly seemed to be renaming files with corruped usernames, and was up to almost 18000 files renamed before I killed it (I've certainly never taken that many photos before...).



I then tried sudo mount /dev/sdb1 /media/zack/SD -v -o rw and got this output:



$ sudo mount /dev/sdb1 /media/zack/SD -v -o rw
mount: you didn't specify a filesystem type for /dev/sdb1
I will try type vfat
/dev/sdb1 on /media/zack/SD type vfat (rw)


Despite not having an error, I still cannot delete the files and get the same old "read-only file system" error.







mount sd-card






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 5 '16 at 23:45







Zack

















asked Sep 5 '16 at 16:48









ZackZack

814




814












  • Does rm as root work? Does rm work for files not in trash?

    – aventurin
    Sep 5 '16 at 16:57











  • @aventurin, sorry, I should have specified that I was using sudo for just about everything. I've updated the question with that change, as well as the results of your second suggestion.

    – Zack
    Sep 5 '16 at 17:13











  • Does dmesg show any errors related to the SD card?

    – aventurin
    Sep 5 '16 at 17:19











  • @aventurin, updated the question again.

    – Zack
    Sep 5 '16 at 17:28






  • 1





    Some SD cards have an mechanical RW lock. Does yours?

    – Serge
    Sep 5 '16 at 19:05

















  • Does rm as root work? Does rm work for files not in trash?

    – aventurin
    Sep 5 '16 at 16:57











  • @aventurin, sorry, I should have specified that I was using sudo for just about everything. I've updated the question with that change, as well as the results of your second suggestion.

    – Zack
    Sep 5 '16 at 17:13











  • Does dmesg show any errors related to the SD card?

    – aventurin
    Sep 5 '16 at 17:19











  • @aventurin, updated the question again.

    – Zack
    Sep 5 '16 at 17:28






  • 1





    Some SD cards have an mechanical RW lock. Does yours?

    – Serge
    Sep 5 '16 at 19:05
















Does rm as root work? Does rm work for files not in trash?

– aventurin
Sep 5 '16 at 16:57





Does rm as root work? Does rm work for files not in trash?

– aventurin
Sep 5 '16 at 16:57













@aventurin, sorry, I should have specified that I was using sudo for just about everything. I've updated the question with that change, as well as the results of your second suggestion.

– Zack
Sep 5 '16 at 17:13





@aventurin, sorry, I should have specified that I was using sudo for just about everything. I've updated the question with that change, as well as the results of your second suggestion.

– Zack
Sep 5 '16 at 17:13













Does dmesg show any errors related to the SD card?

– aventurin
Sep 5 '16 at 17:19





Does dmesg show any errors related to the SD card?

– aventurin
Sep 5 '16 at 17:19













@aventurin, updated the question again.

– Zack
Sep 5 '16 at 17:28





@aventurin, updated the question again.

– Zack
Sep 5 '16 at 17:28




1




1





Some SD cards have an mechanical RW lock. Does yours?

– Serge
Sep 5 '16 at 19:05





Some SD cards have an mechanical RW lock. Does yours?

– Serge
Sep 5 '16 at 19:05










4 Answers
4






active

oldest

votes


















0














Your filesystem seems to be corrupted. If you can't let fsck run until the end, I suggest reformating the card with mkfs.vfat. But to avoid later corruption, I advise you to check your SD card with badblocks first (you can use the destructive -w option, but you will need to recreate the partition table afterwards - with cfdisk, for instance).
Then, if you have any bad blocks, you can pass them to the mkfs command like so:



badblocks -w -o ~/badblocksList /dev/sda
mkfs.vfat -l ~/badblocksList /dev/sda


Note: alternatively, you can use mkfs.vfat -c to perform a simple bad blocks check when formatting. Please also note that FAT is not a journaling filesystem, and, as such, is quite sensitive to corruption if not properly unmounted. If possible, try to avoid its use on devices you carry around.






share|improve this answer























  • I tried this, and it didn't find any bad blocks. mkfs.vfat also returned an error, though I don't remember now what it was. I decided to just use gparted to reformat the card to FAT32, and it seems like everything's working now. Thanks for your help, everyone!

    – Zack
    Sep 8 '16 at 23:48


















0














rm: cannot remove '/XXX/.Trash-1000/files/XXX.rtf': Read-only file system


Hours ago, on a USB stick, I got the same error as shown above. By googling, I found this webpage. I tried the suggested methods but to no avail. Then I started Windows in VirtualBox. Windows successfully deleted the ".Trash-1000" folder and everything inside it.






share|improve this answer






























    0














    Actually hdparm -r0 /dev/sda1 (modify to your device path as appropriate), then ejecting and re-inserting the card worked for me. Simply remounting with the mount command didn't.



    Got the answer from https://askubuntu.com/a/342448/638715






    share|improve this answer






























      -1














      I had the exact same problem. This worked for me:



      • Put the SD card in a USB reader


      • mount it


      • go to its folder in terminal



      sudo rm -Rf .Trash-1000/







      share|improve this answer























      • This removes your trash. Why on earth would this work?

        – knezi
        Jan 21 at 7:23











      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "106"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f308009%2fcant-delete-from-sd-card-read-only-file-system%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      4 Answers
      4






      active

      oldest

      votes








      4 Answers
      4






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      Your filesystem seems to be corrupted. If you can't let fsck run until the end, I suggest reformating the card with mkfs.vfat. But to avoid later corruption, I advise you to check your SD card with badblocks first (you can use the destructive -w option, but you will need to recreate the partition table afterwards - with cfdisk, for instance).
      Then, if you have any bad blocks, you can pass them to the mkfs command like so:



      badblocks -w -o ~/badblocksList /dev/sda
      mkfs.vfat -l ~/badblocksList /dev/sda


      Note: alternatively, you can use mkfs.vfat -c to perform a simple bad blocks check when formatting. Please also note that FAT is not a journaling filesystem, and, as such, is quite sensitive to corruption if not properly unmounted. If possible, try to avoid its use on devices you carry around.






      share|improve this answer























      • I tried this, and it didn't find any bad blocks. mkfs.vfat also returned an error, though I don't remember now what it was. I decided to just use gparted to reformat the card to FAT32, and it seems like everything's working now. Thanks for your help, everyone!

        – Zack
        Sep 8 '16 at 23:48















      0














      Your filesystem seems to be corrupted. If you can't let fsck run until the end, I suggest reformating the card with mkfs.vfat. But to avoid later corruption, I advise you to check your SD card with badblocks first (you can use the destructive -w option, but you will need to recreate the partition table afterwards - with cfdisk, for instance).
      Then, if you have any bad blocks, you can pass them to the mkfs command like so:



      badblocks -w -o ~/badblocksList /dev/sda
      mkfs.vfat -l ~/badblocksList /dev/sda


      Note: alternatively, you can use mkfs.vfat -c to perform a simple bad blocks check when formatting. Please also note that FAT is not a journaling filesystem, and, as such, is quite sensitive to corruption if not properly unmounted. If possible, try to avoid its use on devices you carry around.






      share|improve this answer























      • I tried this, and it didn't find any bad blocks. mkfs.vfat also returned an error, though I don't remember now what it was. I decided to just use gparted to reformat the card to FAT32, and it seems like everything's working now. Thanks for your help, everyone!

        – Zack
        Sep 8 '16 at 23:48













      0












      0








      0







      Your filesystem seems to be corrupted. If you can't let fsck run until the end, I suggest reformating the card with mkfs.vfat. But to avoid later corruption, I advise you to check your SD card with badblocks first (you can use the destructive -w option, but you will need to recreate the partition table afterwards - with cfdisk, for instance).
      Then, if you have any bad blocks, you can pass them to the mkfs command like so:



      badblocks -w -o ~/badblocksList /dev/sda
      mkfs.vfat -l ~/badblocksList /dev/sda


      Note: alternatively, you can use mkfs.vfat -c to perform a simple bad blocks check when formatting. Please also note that FAT is not a journaling filesystem, and, as such, is quite sensitive to corruption if not properly unmounted. If possible, try to avoid its use on devices you carry around.






      share|improve this answer













      Your filesystem seems to be corrupted. If you can't let fsck run until the end, I suggest reformating the card with mkfs.vfat. But to avoid later corruption, I advise you to check your SD card with badblocks first (you can use the destructive -w option, but you will need to recreate the partition table afterwards - with cfdisk, for instance).
      Then, if you have any bad blocks, you can pass them to the mkfs command like so:



      badblocks -w -o ~/badblocksList /dev/sda
      mkfs.vfat -l ~/badblocksList /dev/sda


      Note: alternatively, you can use mkfs.vfat -c to perform a simple bad blocks check when formatting. Please also note that FAT is not a journaling filesystem, and, as such, is quite sensitive to corruption if not properly unmounted. If possible, try to avoid its use on devices you carry around.







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Sep 6 '16 at 6:27









      MayeulCMayeulC

      1457




      1457












      • I tried this, and it didn't find any bad blocks. mkfs.vfat also returned an error, though I don't remember now what it was. I decided to just use gparted to reformat the card to FAT32, and it seems like everything's working now. Thanks for your help, everyone!

        – Zack
        Sep 8 '16 at 23:48

















      • I tried this, and it didn't find any bad blocks. mkfs.vfat also returned an error, though I don't remember now what it was. I decided to just use gparted to reformat the card to FAT32, and it seems like everything's working now. Thanks for your help, everyone!

        – Zack
        Sep 8 '16 at 23:48
















      I tried this, and it didn't find any bad blocks. mkfs.vfat also returned an error, though I don't remember now what it was. I decided to just use gparted to reformat the card to FAT32, and it seems like everything's working now. Thanks for your help, everyone!

      – Zack
      Sep 8 '16 at 23:48





      I tried this, and it didn't find any bad blocks. mkfs.vfat also returned an error, though I don't remember now what it was. I decided to just use gparted to reformat the card to FAT32, and it seems like everything's working now. Thanks for your help, everyone!

      – Zack
      Sep 8 '16 at 23:48













      0














      rm: cannot remove '/XXX/.Trash-1000/files/XXX.rtf': Read-only file system


      Hours ago, on a USB stick, I got the same error as shown above. By googling, I found this webpage. I tried the suggested methods but to no avail. Then I started Windows in VirtualBox. Windows successfully deleted the ".Trash-1000" folder and everything inside it.






      share|improve this answer



























        0














        rm: cannot remove '/XXX/.Trash-1000/files/XXX.rtf': Read-only file system


        Hours ago, on a USB stick, I got the same error as shown above. By googling, I found this webpage. I tried the suggested methods but to no avail. Then I started Windows in VirtualBox. Windows successfully deleted the ".Trash-1000" folder and everything inside it.






        share|improve this answer

























          0












          0








          0







          rm: cannot remove '/XXX/.Trash-1000/files/XXX.rtf': Read-only file system


          Hours ago, on a USB stick, I got the same error as shown above. By googling, I found this webpage. I tried the suggested methods but to no avail. Then I started Windows in VirtualBox. Windows successfully deleted the ".Trash-1000" folder and everything inside it.






          share|improve this answer













          rm: cannot remove '/XXX/.Trash-1000/files/XXX.rtf': Read-only file system


          Hours ago, on a USB stick, I got the same error as shown above. By googling, I found this webpage. I tried the suggested methods but to no avail. Then I started Windows in VirtualBox. Windows successfully deleted the ".Trash-1000" folder and everything inside it.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 22 at 11:45









          Matthew WaiMatthew Wai

          1336




          1336





















              0














              Actually hdparm -r0 /dev/sda1 (modify to your device path as appropriate), then ejecting and re-inserting the card worked for me. Simply remounting with the mount command didn't.



              Got the answer from https://askubuntu.com/a/342448/638715






              share|improve this answer



























                0














                Actually hdparm -r0 /dev/sda1 (modify to your device path as appropriate), then ejecting and re-inserting the card worked for me. Simply remounting with the mount command didn't.



                Got the answer from https://askubuntu.com/a/342448/638715






                share|improve this answer

























                  0












                  0








                  0







                  Actually hdparm -r0 /dev/sda1 (modify to your device path as appropriate), then ejecting and re-inserting the card worked for me. Simply remounting with the mount command didn't.



                  Got the answer from https://askubuntu.com/a/342448/638715






                  share|improve this answer













                  Actually hdparm -r0 /dev/sda1 (modify to your device path as appropriate), then ejecting and re-inserting the card worked for me. Simply remounting with the mount command didn't.



                  Got the answer from https://askubuntu.com/a/342448/638715







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 28 at 13:53









                  Bojan BogdanovicBojan Bogdanovic

                  1




                  1





















                      -1














                      I had the exact same problem. This worked for me:



                      • Put the SD card in a USB reader


                      • mount it


                      • go to its folder in terminal



                      sudo rm -Rf .Trash-1000/







                      share|improve this answer























                      • This removes your trash. Why on earth would this work?

                        – knezi
                        Jan 21 at 7:23















                      -1














                      I had the exact same problem. This worked for me:



                      • Put the SD card in a USB reader


                      • mount it


                      • go to its folder in terminal



                      sudo rm -Rf .Trash-1000/







                      share|improve this answer























                      • This removes your trash. Why on earth would this work?

                        – knezi
                        Jan 21 at 7:23













                      -1












                      -1








                      -1







                      I had the exact same problem. This worked for me:



                      • Put the SD card in a USB reader


                      • mount it


                      • go to its folder in terminal



                      sudo rm -Rf .Trash-1000/







                      share|improve this answer













                      I had the exact same problem. This worked for me:



                      • Put the SD card in a USB reader


                      • mount it


                      • go to its folder in terminal



                      sudo rm -Rf .Trash-1000/








                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Dec 6 '18 at 14:32









                      FerroaoFerroao

                      12217




                      12217












                      • This removes your trash. Why on earth would this work?

                        – knezi
                        Jan 21 at 7:23

















                      • This removes your trash. Why on earth would this work?

                        – knezi
                        Jan 21 at 7:23
















                      This removes your trash. Why on earth would this work?

                      – knezi
                      Jan 21 at 7:23





                      This removes your trash. Why on earth would this work?

                      – knezi
                      Jan 21 at 7:23

















                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Unix & Linux Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f308009%2fcant-delete-from-sd-card-read-only-file-system%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      -mount, sd-card

                      Popular posts from this blog

                      Mobil Contents History Mobil brands Former Mobil brands Lukoil transaction Mobil UK Mobil Australia Mobil New Zealand Mobil Greece Mobil in Japan Mobil in Canada Mobil Egypt See also References External links Navigation menuwww.mobil.com"Mobil Corporation"the original"Our Houston campus""Business & Finance: Socony-Vacuum Corp.""Popular Mechanics""Lubrite Technologies""Exxon Mobil campus 'clearly happening'""Toledo Blade - Google News Archive Search""The Lion and the Moose - How 2 Executives Pulled off the Biggest Merger Ever""ExxonMobil Press Release""Lubricants""Archived copy"the original"Mobil 1™ and Mobil Super™ motor oil and synthetic motor oil - Mobil™ Motor Oils""Mobil Delvac""Mobil Industrial website""The State of Competition in Gasoline Marketing: The Effects of Refiner Operations at Retail""Mobil Travel Guide to become Forbes Travel Guide""Hotel Rankings: Forbes Merges with Mobil"the original"Jamieson oil industry history""Mobil news""Caltex pumps for control""Watchdog blocks Caltex bid""Exxon Mobil sells service station network""Mobil Oil New Zealand Limited is New Zealand's oldest oil company, with predecessor companies having first established a presence in the country in 1896""ExxonMobil subsidiaries have a business history in New Zealand stretching back more than 120 years. We are involved in petroleum refining and distribution and the marketing of fuels, lubricants and chemical products""Archived copy"the original"Exxon Mobil to Sell Its Japanese Arm for $3.9 Billion""Gas station merger will end Esso and Mobil's long run in Japan""Esso moves to affiliate itself with PC Optimum, no longer Aeroplan, in loyalty point switch""Mobil brand of gas stations to launch in Canada after deal for 213 Loblaws-owned locations""Mobil Nears Completion of Rebranding 200 Loblaw Gas Stations""Learn about ExxonMobil's operations in Egypt""Petrol and Diesel Service Stations in Egypt - Mobil"Official websiteExxon Mobil corporate websiteMobil Industrial official websiteeeeeeeeDA04275022275790-40000 0001 0860 5061n82045453134887257134887257

                      Frič See also Navigation menuinternal link

                      Identify plant with long narrow paired leaves and reddish stems Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?What is this plant with long sharp leaves? Is it a weed?What is this 3ft high, stalky plant, with mid sized narrow leaves?What is this young shrub with opposite ovate, crenate leaves and reddish stems?What is this plant with large broad serrated leaves?Identify this upright branching weed with long leaves and reddish stemsPlease help me identify this bulbous plant with long, broad leaves and white flowersWhat is this small annual with narrow gray/green leaves and rust colored daisy-type flowers?What is this chilli plant?Does anyone know what type of chilli plant this is?Help identify this plant