LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Filesystem on flash via mtdblock corrupted after umount (https://www.linuxquestions.org/questions/linux-software-2/filesystem-on-flash-via-mtdblock-corrupted-after-umount-4175467624/)

Refractor 06-27-2013 02:08 PM

Filesystem on flash via mtdblock corrupted after umount
 
Greetings!
Not sure if this is the right section, for this but here goes:
I have an atheros ap123 reference board with 4MB flash chip. The partitions are like this:
128(uboot), 1024(kernel), 2816(rootfs), 64k(config), 64k(art)
The root filesystem is exatcly 2816k so shrinking it is out of the question. The erase size is 64k so I can't create a JFFS2 filesystem on the config partition and I can't overwrite the art partition because that contains atheros radio calibration data (the wireless isn't working without it).
I tried creating a minix filesystem on the config partition and mount it read-write via the mtdblock driver. After writing some configuration data on the new minix filesystem, I reboot the board and remount the minix filesystem. The mount succeds, but all data on the filesystem is scrambled and somehow one of the files is a directory. I fsck.minix -f'ed the mtdblock device and I got about a million warnings that the Inode count is too high. I read somewhere (@random googling) that minix can be used on a flash chip via the mtdblock driver. Any hints how to avoid filesystem corruption or an alternative filesystem that'll work with kernel 2.6.31 (there's proprietary kernel modules without source so I can't change it). Thanks!

jefro 06-27-2013 07:13 PM

From here.
http://www.linux-mtd.infradead.org/faq/general.html


"It makes sense to use mtdblock_ro for read-only file systems or read-only mounts. For example, one may use SquashFS as it compresses data quite well. But think twice before using mtdblock in read-write mode. And don't try to use it on NAND flash as it is does not handle bad eraseblocks. "


All times are GMT -5. The time now is 02:00 AM.