Find the answer to your Linux question:
Results 1 to 6 of 6
Hi all.. I have a very strange problem.. My system has a sd memory card which is mounted with vfat filesystem with "rw" mode. Now when I transfer a number(say ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2009
    Posts
    85

    MMC Card suddenly changes to readonly file system


    Hi all.. I have a very strange problem..
    My system has a sd memory card which is mounted with vfat filesystem with "rw" mode. Now when I transfer a number(say 150 ) files, my sd card suddenly changes to ro filesystem and the dmesg output gave the following :
    FAT: Filesystem panic (dev sdmmc0p1)
    fat_free_clusters: deleting FAT entry beyond EOF
    File system has been set read-only
    what is reason for the SD card getting suddenly changing to read only filesystem. Can anyone tell what is reason.

    Thanks in advance.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,509
    Reaching back into the memory banks, as I recall, FAT file systems require an EOF (Ctrl-Z) to properly terminate a text file. Something is confusing the FAT file system driver after writing a lot of files quickly so that it thinks that a file is fubar. Please provide your system OS distribution+version information, and information about the memory card (type, manufacturer, how long you have been using it, etc).
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Oct 2009
    Posts
    85
    And if I do a reboot what does linux internally does. I want to know in terms of kernel, can you please explain me.

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,509
    Actually, I think that the Ctrl-Z is a DOS/Windows EOF thing and not actually required by the FAT file system. Linux does not place the EOF indicator at the end of a text file, but registers the actual file size in the directory structure. It may be that the driver is not recording the size correctly, hence the apparent corruption. You might want to disable write-behind caching for the FAT device. It will be slower since the OS will not cache writes, but rather will wait as each file and associated directory changes are physically written before returning from the operation. If that works, then there is definitely a problem with the driver. Alternatively, you could execute the sync command after each file is transfered, which will accomplish much the same.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  5. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,509
    BTW, what distribution+version of Linux, and what kernel are you running?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #6
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,206
    The first thing that happens when you reboot is that the runlevel switches to 6. This causes scripts to be run that kill all processes, unmount drives and finally run the reboot instruction.

    What follows is just like a cold boot. The bios's boot program is run and loads the first sector of the boot device, which probably contains the first stage of GRUB. GRUB puts up its menu and you choose the system you want to boot up. GRUB then loads the kernel, which uncompresses itself, initialises the hardware, and finally runs the init program. Init creates consoles, runs all the scripts appropriate to the default runlevel, and starts the gui. End of story!
    "I'm just a little old lady; don't try to dazzle me with jargon!"
    www.hrussman.entadsl.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •