Problems with mounting a JFFS2 file system image

Navin Boppuri navin.boppuri at newisys.com
Tue Jan 29 19:09:49 EST 2002


Hello all,

I have been able to succesfully partition my flash and mount a jffs2 file system on the same. I am able to copy, create, read and write files onto my new file system. 

Now, I wanted to create a file system on my host machine using the mkfs.jffs2 utility and mount the file system onto my flash partition on my embedded device. But I havent been successful in doing so. I followed the JFFS2 README and this is what I did:

	mkfs.jffs -d tmp_fs -o jffs2.image   ( tmp_fs is a directory with all my files in it)

	erase /dev/mtd0 0 8 ( I have 8 sectors to erase )
		Worked like a charm. Verified that the flash was completely erased.

	cp jffs2.image /dev/mtd0	( No problem here. I have it running in DEBUG mode. )

	insmod jffs2.o 			( No problem here. I get all the messages that I expect)

	mount -t jffs2 /dev/mtdblock0 /mnt/jffs2

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0x8519 in
stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000004: 0x3100 in
stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008: 0x1dd9 in
stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000000c: 0x0100 in
stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000014: 0x0200 in
stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000018: 0x0202 in
stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000001c: 0x0908 in
stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000020: 0x77c0 in
stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000024: 0x0b76 in
stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000028: 0x7465 in
stead
Further such events for this erase block will not be printed
JFFS2: Erase block at 0x00000000 is not formatted. It will be erased
Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
mount: wrong fs type, bad option, bad superblock on /dev/mtdblock0,
       or too many mounted file systems


I dont see any other special instructions on doing this. What am I missing here? What am I doing wrong? 

Thank you,
Navin Boppuri.




More information about the linux-mtd mailing list