http://www.linux-mtd.infradead.org/faq/jffs2.html
I cannot mount JFFS2 and see "Magic bitmask 0x1985 not found" messages
If you cannot mount your JFFS2 file system and you see many messages like
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000024: 0x2b10 instead ...
Further such events for this erase block will not be printed
this means that the data on your flash device is not a valid JFFS2 file system. There is no single solution for this problem, but we will try to provide you some ideas how to fix this.
The first question you should try to answer is "why the data on my flash device is incorrect so that JFFS2 rejects to deal with it?". There are may be a plenty of reasons, e.g.:
- you flash driver is severely buggy so it reads trash instead of valid data;
- you flashed some trash instead of a valid JFFS2 image;
- you did not manage to flash JFFS2 image correctly so that you ended up with garbage on your flash, although the original image was perfectly fine;
- you forgot to erase your flash before flashing it, etc.
Anyways, JFFS2 wouldn't complain if it was able to find correct data. As it does complain, there is something wrong with the data it reads.
One common mistake is to use /dev/mtdX or /dev/mtdblockX devices to flash JFFS2 images on NAND flashes. E.g.
cp jffs2_fs.img /dev/mtd2
This is incorrect because when dealing with NAND flashes one has to skip bad eraseblocks and write only in NAND page size chunks. Please, use the nandwrite utility instead.
Also please, do not forget to erase your flash before flashing the image. You may use the flash_eraseall utility for this. And it makes sense to make sure the erase functionality actually works my reading the erase MTD device back and checking that only 0xFF bytes were read.
You may try to check if your flash driver works correctly and if you flashed the file system image correctly by means of reading the flash back after you have flashed your image, and compare the read image with the original one. Please, use the nandread utility to read from NAND flashes.
You can also do the following experiment to make sure JFFS2 works well. Erase your MTD device and mount it to JFFS2. You will end up with an empty file system. Copy some files to the JFFS2 file system and unmount it. Then mount it again and see if it mounts without problems. If it does, this is most probably not a JFFS2 bug.

本文探讨了无法正确挂载JFFS2文件系统时出现的Magic bit mask 0x1985 not found错误,并提供了可能导致此问题的原因分析及解决方法。包括检查闪存驱动器、确保正确读取和写入数据、避免使用不正确的设备名称进行操作、以及在闪存擦除前进行彻底检查等步骤。
1226

被折叠的 条评论
为什么被折叠?



