Memory Cards Corrupted?


POLAX

Still Fresh
Joined
Dec 27, 2005
Messages
5
The GP2X seems to corrupt my memory cards (space not being freed) when deleting files from either the GP2X "explorer" or when attached via USB (filesystem check reports incorrect free space clusters). This may be because I formatted them using vfat with 32K blocks...can somebody try this and confirm?

Also - are there any plans to support "journaled" filesystems (xfs, ext3, reiserfs, NTFS, jffs)?
 
You need to synchronize the file system after deleting files or playing via the USB link. You can do this by creating a .gpu file and placing something like this in it:

#!/bin/bash
sync

or unmount/remount the sd (requires the script to run from nand) or possibly using the "remount" option of mount.

The "sync" command will cause the buffers to be flushed to the sd card, rather than just sitting in memory - the same goes for the unmount/remount.

EDIT: The 2x supports lots of other file systems, ext2, ext3, jffs etc but GPH force FAT32 when the card in inserted, plus FAT32 is the only one that'll work over a usb link to a Windows (and possibly Mac) host.
 
Squidge posted on Dec 28 2005 at 01:18 AM said:
You need to synchronize the file system after deleting files or playing via the USB link. You can do this by creating a .gpu file and placing something like this in it:

#!/bin/bash
sync

or unmount/remount the sd (requires the script to run from nand) or possibly using the "remount" option of mount.

The "sync" command will cause the buffers to be flushed to the sd card, rather than just sitting in memory - the same goes for the unmount/remount.

EDIT: The 2x supports lots of other file systems, ext2, ext3, jffs etc but GPH force FAT32 when the card in inserted, plus FAT32 is the only one that'll work over a usb link to a Windows (and possibly Mac) host.
But it would theorectically easily possible to include this support for reiserFS for example? I mean, FAT is really.. old... and anyways, a windows user wouldnt really be able to format his sd card as ext3 "accidentally" ;D !
 
Last edited by a moderator:
I don't think you understand how mass storage devices work (such as the 2x itself, usb keys, etc). The device with the file system has no knowledge whatsoever about what files are on the file system - they only know how to read and write certain parts of it. So Windows/Mac or whatever has to know the file system inside and out.

So, who fancies writing an reiserFS or ext3 file system for windows and mac?
 
It's generally not a good idea to use a journaling filesystem on a flash card since the steady write cycles will affect the lifetime of the flash memory. Especially on ext3 (and i think reiser too, although I don't know for sure), where the journal is hosted in a single area and not in several inodes like jffs2.

If you want best compatibility, you should use ext2 on the card.
 
Not a good idea for FAT to be used on a NAND memory device either.

As repeated cycles of overwriting the File Allocation Tables, will mess up the areas occupied by the FATs. Eventually I think those areas will run out of 'writes' and need to use the 'backup' 'sectors' of the 'disk'. (replace HD terms with NAND memroy terms where appropriate B) )

FAT, Old and stupid since 1980. :p

Should have retired AGES ago.
 
Back
Top