[maemo-developers] Memory card mmc changed status to Read only file system (30)

From: Eero Tamminen eero.tamminen at nokia.com
Date: Wed Aug 13 09:57:36 EEST 2008
Hi,

ext Darius Jack wrote:
> OS2007HE worked fine, run shell scripts, applications.
> Recently run wget in recursive mode.
> Download to flash memory.
> Learned  how to recorsive download to media memory card (MMC).
> Copied downloaded html files from flash to memory card to make room on flash.
> 
> And finally tried to remove wget downloaded files from media memory card
> and found out any, every, each file to be asterisked and can not be deleted.
> 
> run mount from command line
> one entry for /media/mmc1
> 
> /dev/mcblk0.. on /media/mmc1 type vfat (rw, noauto, nodev, noexec, nosuid, utf8, uid=29999, shortname=mixed, dmask=000)
> 
> chmod -x /media/mmc1
> chmod: /media/mmc1: Read-only file system
> 
> I gvet used media card to save maps in maemo mapper,
> today nbo chance to run maemo-mapper.
> 
> Please tell me how to have /media/mmc1 back read-write file system,
> as changed nothing exceptionally to change status of media file system.

Only known reason for this is that the memory card file system has
gotten corrupted.  When kernel notices this[1], it remounts the file
system as read-only so that user cannot corrupt it more.

The file system can get corrupted if:
- You disconnect the USB cable from PC without "safely remove"
- You take the memory card out when it's reported as
   being in use (when you open the card cover)
- You take the battery out
- Device HW watchdog resets the device
while the card is being written or it otherwise has data which
hasn't been completely written to the card when above things are done.

For example streaming flash/video, browser/package downloads, downloads
to mail folder that's on memory card, map tile downloads configured to
be saved on memory card etc can use memory card extensively.

 From XTerm you can run "dosfsck -n /dev/mcblk0.." to check the file
system.  Repair can be done in the device from the File manager[2]
(or as root with dosfsck), or from PC either using a card reader or
when the device USB cable is connected (at least with Linux it's
better to unmount the card from PC side before repair though).


	- Eero

[1] Kernel notices the corruption only when some information in
     the file system is clearly wrong. File system consistency is not
     checked when the card is mounted (neither in Linux nor Windows
     either for removable devices).
[2] With large & full card consistency check / repair can take several
     minutes and fail because it requires more memory than is available
     on the device.

More information about the maemo-developers mailing list