View the Most Wanted LQ Wiki articles.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 06-27-2013, 03:08 PM   #1
Registered: Oct 2008
Location: Rousse, Bulgaria
Distribution: Slackware
Posts: 89

Rep: Reputation: 24
Question Filesystem on flash via mtdblock corrupted after umount

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!
Old 06-27-2013, 08:13 PM   #2
LQ Guru
Registered: Mar 2008
Posts: 13,689

Rep: Reputation: 1743Reputation: 1743Reputation: 1743Reputation: 1743Reputation: 1743Reputation: 1743Reputation: 1743Reputation: 1743Reputation: 1743Reputation: 1743Reputation: 1743
From here.

"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. "


filesystem, mtd

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Does upstart umount filesystem during shutdown? ck_at_work Linux - Newbie 4 09-19-2010 09:17 PM
Corrupted Filesystem 2buck56 Linux - General 6 11-27-2009 11:42 AM
can i umount var filesystem?? raklo Linux - Kernel 14 06-19-2007 09:44 AM
reg: fuser & umount filesystem problem hinetvenkat Linux - Software 3 05-03-2007 05:03 AM
corrupted filesystem gbolly_bolly Linux - Distributions 2 05-06-2002 04:11 PM

All times are GMT -5. The time now is 12:14 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration