Hi All,
My flash layout is shown like this,
root@OpenWrt:/# df -Th
Filesystem Type Size Used Available Use% Mounted on
rootfs rootfs 124.8M 68.0K 124.7M 0% /
/dev/root squashfs 6.3M 6.3M 0 100% /rom
tmpfs tmpfs 124.8M 36.0K 124.8M 0% /tmp
tmpfs tmpfs 124.8M 68.0K 124.7M 0% /tmp/root
overlayfs:/tmp/root overlay 124.8M 68.0K 124.7M 0% /
tmpfs tmpfs 512.0K 0 512.0K 0% /dev
As you can see, Overlay is mounted in "tmpfs". Because, /dev/mtdblock3 is not having expected JFFS2 magic number "1985". It contains some garbage number like "6873".
[ 26.550000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0x6873 instead
Hex dump of /dev/mtdblock3 is,
root@OpenWrt:/# hexdump /dev/mtdblock3 | head -n 5
0000000 6873 7173 a606 0000 07b1 c35a 0000 0400
0000010 3c00 0000 0400 1200 c006 0100 0400 0000
0000020 d81f 2c2c 0000 0000 9adb 6200 0000 0000
0000030 92db 6200 0000 0000 ffff ffff ffff ffff
0000040 2e58 6200 0000 0000 3c8c 6200 0000 0000
Block Info is,
root@OpenWrt:/# block info
/dev/mtdblock2: UUID="aae5191b-840e826c-8532deb6-24ce9fd0" VERSION="4.0" TYPE="squashfs"
/dev/mtdblock3: UUID="aae5191b-840e826c-8532deb6-24ce9fd0" VERSION="4.0" TYPE="squashfs"
We are trying so hard to understand following things, But still no luck! Any information/guidelines would be so much helpful..!
1. Why /dev/mtdblock3 doesn't have magic number ox9185 (This magic number represents JFFS2).
2. How /dev/mtdblock3 is created and How to write magic number 0x9185 to /dev/mtdblock3 ?
I have checked source file "chaos_calmer\build_dir\target-mips_mips32_uClibc-0.9.33.2\fstools-2015-09-15\mount_root.c". Function "volume_identify()" reads magic number from /dev/mtdblock3. Instead of expected magic number 0x9185, I am receiving 0x6873. So overlay got mounted in tmpfs with warning "no usable overlay filesystem found, using tmpfs overlay".
Where I should look in source to fix this magic number error of /dev/mtdblock3 ?
@hnyman Can you give some clue about this??
Thanks In Advance,
By Perumal