How to delete/edit files from readonly filesystem

Posted by Santosh Linkha on Ask Ubuntu See other posts from Ask Ubuntu or by Santosh Linkha
Published on 2011-03-23T09:32:00Z Indexed on 2012/03/22 23:38 UTC
Read the original article Hit count: 688

Filed under:
|
|
|
|

I am having problem with my memory device (actually a memory card that act external memory device like pendrive).

experimentx@workmateX:/var/www/zendtest$ sudo rm /media/A88F-8788/python-2.7.1-docs-html.zip
rm: cannot remove `/media/A88F-8788/python-2.7.1-docs-html.zip': Read-only file system

I tried to change the file permission of the system but that doesn't work

experimentx@workmateX:/var/www/zendtest$ sudo chmod 0777 /media/A88F-8788/python-2.7.1-docs-html.zip
chmod: changing permissions of `/media/A88F-8788/python-2.7.1-docs-html.zip': Read-only file system

But it perfectly works on windows.

UPDATE

On opening the drive and running command sudo mount -o remount,rw /media/A88F-8788

/var/log/syslog:

Mar 23 15:29:48 workmateX kernel: [18042.257407] fat_get_cluster: 11 callbacks suppressed
Mar 23 15:29:48 workmateX kernel: [18042.257414] FAT: Filesystem error (dev sdb1)
Mar 23 15:29:48 workmateX kernel: [18042.257418]     fat_get_cluster: invalid cluster chain (i_pos 0)
Mar 23 15:29:48 workmateX kernel: [18042.257425] FAT: Filesystem has been set read-only
Mar 23 15:29:48 workmateX kernel: [18042.258187] FAT: Filesystem error (dev sdb1)
Mar 23 15:29:48 workmateX kernel: [18042.258194]     fat_get_cluster: invalid cluster chain (i_pos 0)
Mar 23 15:31:35 workmateX kernel: [18149.333787] FAT: Filesystem error (dev sdb1)
Mar 23 15:31:35 workmateX kernel: [18149.333795]     fat_get_cluster: invalid cluster chain (i_pos 0)
Mar 23 15:31:35 workmateX kernel: [18149.335949] FAT: Filesystem error (dev sdb1)
Mar 23 15:31:35 workmateX kernel: [18149.335957]     fat_get_cluster: invalid cluster chain (i_pos 0)
Mar 23 15:31:35 workmateX kernel: [18149.354903] FAT: Filesystem error (dev sdb1)
Mar 23 15:31:35 workmateX kernel: [18149.354911]     fat_get_cluster: invalid cluster chain (i_pos 0)
Mar 23 15:31:35 workmateX kernel: [18149.357213] FAT: Filesystem error (dev sdb1)
Mar 23 15:31:35 workmateX kernel: [18149.357221]     fat_get_cluster: invalid cluster chain (i_pos 0)
Mar 23 15:31:35 workmateX kernel: [18149.359547] FAT: Filesystem error (dev sdb1)
Mar 23 15:31:35 workmateX kernel: [18149.359555]     fat_get_cluster: invalid cluster chain (i_pos 0)
Mar 23 15:31:35 workmateX kernel: [18149.361929] FAT: Filesystem error (dev sdb1)
Mar 23 15:31:35 workmateX kernel: [18149.361936]     fat_get_cluster: invalid cluster chain (i_pos 0)
Mar 23 15:31:35 workmateX kernel: [18149.377416] FAT: Filesystem error (dev sdb1)
Mar 23 15:31:35 workmateX kernel: [18149.377424]     fat_get_cluster: invalid cluster chain (i_pos 0)
Mar 23 15:31:35 workmateX kernel: [18149.379384] FAT: Filesystem error (dev sdb1)
Mar 23 15:31:35 workmateX kernel: [18149.379392]     fat_get_cluster: invalid cluster chain (i_pos 0)
Mar 23 15:31:35 workmateX kernel: [18149.381898] FAT: Filesystem error (dev sdb1)
Mar 23 15:31:35 workmateX kernel: [18149.381906]     fat_get_cluster: invalid cluster chain (i_pos 0)
Mar 23 15:31:35 workmateX kernel: [18149.383764] FAT: Filesystem error (dev sdb1)
Mar 23 15:31:35 workmateX kernel: [18149.383772]     fat_get_cluster: invalid cluster chain (i_pos 0)
Mar 23 15:31:40 workmateX kernel: [18154.569747] fat_get_cluster: 11 callbacks suppressed
Mar 23 15:31:40 workmateX kernel: [18154.569754] FAT: Filesystem error (dev sdb1)
Mar 23 15:31:40 workmateX kernel: [18154.569758]     fat_get_cluster: invalid cluster chain (i_pos 0)
Mar 23 15:31:40 workmateX kernel: [18154.569765] FAT: Filesystem has been set read-only
Mar 23 15:31:40 workmateX kernel: [18154.572022] FAT: Filesystem error (dev sdb1)
Mar 23 15:31:40 workmateX kernel: [18154.572029]     fat_get_cluster: invalid cluster chain (i_pos 0)
Mar 23 15:31:40 workmateX kernel: [18154.582933] FAT: Filesystem error (dev sdb1)
Mar 23 15:31:40 workmateX kernel: [18154.582941]     fat_get_cluster: invalid cluster chain (i_pos 0)
Mar 23 15:31:40 workmateX kernel: [18154.585921] FAT: Filesystem error (dev sdb1)
Mar 23 15:31:40 workmateX kernel: [18154.585929]     fat_get_cluster: invalid cluster chain (i_pos 0)
Mar 23 15:31:40 workmateX kernel: [18154.587819] FAT: Filesystem error (dev sdb1)
Mar 23 15:31:40 workmateX kernel: [18154.587827]     fat_get_cluster: invalid cluster chain (i_pos 0)
Mar 23 15:31:40 workmateX kernel: [18154.597547] FAT: Filesystem error (dev sdb1)
Mar 23 15:31:40 workmateX kernel: [18154.597555]     fat_get_cluster: invalid cluster chain (i_pos 0)
Mar 23 15:31:40 workmateX kernel: [18154.599503] FAT: Filesystem error (dev sdb1)
Mar 23 15:31:40 workmateX kernel: [18154.599511]     fat_get_cluster: invalid cluster chain (i_pos 0)
Mar 23 15:31:40 workmateX kernel: [18154.602896] FAT: Filesystem error (dev sdb1)
Mar 23 15:31:40 workmateX kernel: [18154.602905]     fat_get_cluster: invalid cluster chain (i_pos 0)
Mar 23 15:31:40 workmateX kernel: [18154.615338] FAT: Filesystem error (dev sdb1)
Mar 23 15:31:40 workmateX kernel: [18154.615346]     fat_get_cluster: invalid cluster chain (i_pos 0)
Mar 23 15:31:40 workmateX kernel: [18154.618574] FAT: Filesystem error (dev sdb1)
Mar 23 15:31:40 workmateX kernel: [18154.618581]     fat_get_cluster: invalid cluster chain (i_pos 0)

var/log/message:

Mar 23 15:29:48 workmateX kernel: [18042.257407] fat_get_cluster: 11 callbacks suppressed Mar 23 15:31:40 workmateX kernel: [18154.569747] fat_get_cluster: 11 callbacks suppressed

© Ask Ubuntu or respective owner

Related posts about filesystem

Related posts about delete