WGR614v8 + JFFS2 with garbage

7 posts / 0 new
Last post
Fmay
Fmay's picture
WGR614v8 + JFFS2 with garbage

 Somthing know how to check the memory integrity and correct bad sectors of the JFFS2 partition?  

 --- Firstboot

Unlocking rootfs_data ...
jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
jffs2_build_filesystem(): unlocking the mtd device... done.
jffs2_build_filesystem(): erasing all blocks after the end marker... done.
mount: Mounting /proc on /jffs/proc failed: No such file or directory
firstboot has already been run
jffs2 partition is mounted, only resetting files
creating directories... done
setting up symlinks... ARGH. About to write node to 0x000a4904 on flash, but there's data already there:
0x000a4904: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ARGH. About to write node to 0x00092504 on flash, but there's data already there:
0x00092504: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Node CRC 47be2f81 != calculated CRC 06ab5337 for node at 00097e7c
cp: unable to preserve ownership of `./lib/libm.so.0': Input/output error
Node totlen on flash (0x00000000) != totlen in node ref (0x00000058)
done

 

--- Next boot

Unlocking rootfs_data ...
jffs2_scan_empty(): Empty block at 0x0008000c ends at 0x0008fff8 (with 0x00000004)! Marking dirty
jffs2_scan_inode_node(): Data CRC failed on node at 0x00092490: Read 0x147a471a, calculated 0x10a1610f
jffs2_scan_dirent_node(): Name CRC failed on node at 0x00097ed0: Read 0xb49ea3e2, calculated 0xbf457cc3
jffs2_scan_inode_node(): Data CRC failed on node at 0x000992ac: Read 0x28639b3d, calculated 0x5bbf8dbe
jffs2_scan_dirent_node(): Name CRC failed on node at 0x0009dad0: Read 0xf26e2305, calculated 0xf6b50510
jffs2_scan_dirent_node(): Name CRC failed on node at 0x000a46cc: Read 0x7a885744, calculated 0xf35b7ca4
jffs2_scan_inode_node(): Data CRC failed on node at 0x000a48a4: Read 0x91cb77d1, calculated 0x18185c31
jffs2_scan_dirent_node(): Name CRC failed on node at 0x000a6ed0: Read 0x912a6407, calculated 0xff4162e0
Eep. Child "modules.conf" (ino #107) of dir ino #13 doesn't exist!
Eep. Child "dictionary" (ino #464) of dir ino #71 doesn't exist!
mount: can't load library 'libm.so.0'
mount: can't load library 'libm.so.0'
/bin/sh: can't load library 'libm.so.0'
/bin/sh: can't load library 'libm.so.0'
logread: can't load library 'libm.so.0'
mount: can't load library 'libm.so.0'
/sbin/mount_root: 38: Can't op

Kernel panic: Attempted to kill init!

 

 Thanks for any help

bzing2
bzing2's picture
Whats your version of:

Whats your version of:

Creating 5 MTD partitions on "sflash":
0x00000000-0x00020000 : "cfe"
0x00020000-0x003f0000 : "linux"
0x0009b000-0x00240000 : "rootfs"
0x003f0000-0x00400000 : "nvram"
0x00240000-0x00380000 : "rootfs_data"
Fmay
Fmay's picture
Hi Bzing2, my MTD partition

Hi Bzing2, my MTD partition has one test approach of free space.

Creating 5 MTD partitions on "sflash":
0x00000000-0x00020000 : "cfe"
0x00020000-0x003e0000 : "linux"
0x0009a800-0x00320000 : "rootfs"
0x003f0000-0x00400000 : "nvram"
0x00320000-0x003e0000 : "rootfs_data"

However, I tried with your MTD partition of your OpenWrt contribution but the same problem is showed. I think that possibly it has memory damaged regions, not sure.

Thanks.

bzing2
bzing2's picture
OK, well you rootfs_data

OK, well you rootfs_data partition has the potential to write over the bootloader checksum and checksum length. If that happens you will get a checksum error and you will be unable to boot. The following are the things to be avoided!

0x3afff8 KERNEL_LEN_ADDR
0x3afffc KERNEL_CHKSUM_ADDR

Your running over something at 0x3c4904 during the first boot. Which would be well outside of my partition that stops at 0x380000. Until you get the first boot with jffs2 working, the second one isn't going too!

I should point out that the layout I use if the one that Netgear use. I suspect there is a very good reason for it...

Fmay
Fmay's picture
Ok, you are right.

Ok, you are right.

The following result was using your OpenWRT contribution (bcm947xx_flash.c):

Creating 5 MTD partitions on "sflash":
0x00000000-0x00020000 : "cfe"
0x00020000-0x003f0000 : "linux"
0x0009a400-0x00320000 : "rootfs"
0x003f0000-0x00400000 : "nvram"
0x00320000-0x00380000 : "rootfs_data"

--- Firstboot

Unlocking rootfs_data ...
jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
jffs2_build_filesystem(): unlocking the mtd device... done.
jffs2_build_filesystem(): erasing all blocks after the end marker... done.
mount: Mounting /proc on /jffs/proc failed: No such file or directory
firstboot has already been run
jffs2 partition is mounted, only resetting files
creating directories... done
setting up symlinks... Data CRC 28639b3d != calculated CRC 5bbf8dbe for node at 0003b5ac
cp: unable to preserve ownership of `./usr/bin/uniq': Input/output error
done

--- Next Boot
Unlocking rootfs_data ...
jffs2_scan_dirent_node(): Name CRC failed on node at 0x00033dd0: Read 0x2e7aa6ba, calculated 0x4011a05d
jffs2_scan_inode_node(): Data CRC failed on node at 0x0003b5ac: Read 0x28639b3d, calculated 0x5bbf8dbe
jffs2_scan_dirent_node(): Name CRC failed on node at 0x000448d4: Read 0x1eef91a4, calculated 0xfae15eaf
jffs2_scan_dirent_node(): Name CRC failed on node at 0x00047ccc: Read 0x67b9e2d8, calculated 0x1b650d6f
jffs2_scan_dirent_node(): Name CRC failed on node at 0x000491cc: Read 0x8e1227b2, calculated 0x7e1db4f6
jffs2_scan_dirent_node(): Name CRC failed on node at 0x0004e7d0: Read 0xa2a6edb9, calculated 0xd8ccb711
Eep. Child "uniq" (ino #661) of dir ino #36 doesn't exist!

Could be it one case of the damaged regions?

Thanks for any commentary

bzing2
bzing2's picture
I think you probably have me

I think you probably have me stumped! I have not, as yet, had to get my hands dirty with JFFS2 in the kernel.

I occasionally get the same problems, but I had put that down not syncing before a reboot. So try running "sync" before you reboot, perhaps the files have not been written. (I am grasping at straws here).

You do seem to have some booting problems that I don't see. Its probably worth fixing the following errors first. At first glance you may be running /etc/preinit more than once.

mount: Mounting /proc on /jffs/proc failed: No such file or directory
firstboot has already been run
jffs2 partition is mounted, only resetting files
cp: unable to preserve ownership of `./usr/bin/uniq': Input/output error

My guess would be a bug in the jff2s or even more likely in the sflash driver. However before looking there I suggest you fix all the other errors first so we can see what is really at fault!

Fmay
Fmay's picture
mount: Mounting /proc on


		mount: Mounting /proc on /jffs/proc failed: No such file or directory
	firstboot has already been run
	jffs2 partition is mounted, only resetting files
	cp: unable to preserve ownership of `./usr/bin/uniq': Input/output error
	

Unlocking rootfs_data ...
jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
jffs2_build_filesystem(): unlocking the mtd device... done.
jffs2_build_filesystem(): erasing all blocks after the end marker... done.
firstboot has already been run
jffs2 partition is mounted, only resetting files
creating directories... done
setting up symlinks... Data CRC 28639b3d != calculated CRC 5bbf8dbe for node at 00099eac
cp: unable to preserve ownership of `./usr/bin/logger': Input/output error
Data CRC 28639b3d != calculated CRC 5bbf8dbe for node at 0009a2ac
cp: unable to preserve ownership of `./usr/bin/nslookup': Input/output error
Data CRC 28639b3d != calculated CRC 5bbf8dbe for node at 0009acac
cp: unable to preserve ownership of `./usr/bin/test': Input/output error