Disabling jffs2 overlayfs

Hi there,

Default behavior of OpenWRT is to create overlayfs for read and write changes.
What is the best way to disable the overlay? I just want to have squashfs (ro) with no overlay over it.
I see that most of the logic related to the rootfs_data partition is handled by fstools, and mount_root in particular does the mounting. The kernel just finds the end of squashfs and creates new mtd partition (in memory) after it.
Before I start hacking :), may be the option is already available?

Is disabling overlayfs in kernel proper way to do it? or may be changing bootargs from rootfstype=squashfs,jffs2 to something else?

Any suggestions?
If this feature is not available, what is the proper way to configure ramoverlayfs?

Thank you

Cheers,
Andy

I too would love to know the answer to this.
Did you work out how to do it?
I managed to force it by writing random data to the end of the flash partition (between the end of the squashfs and the end of the flash) which does prevent the jffs2 mounting, but the kernel logs get filled with:

[   41.371436] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040000: 0x4a36 instead
[   41.381132] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040004: 0x44b6 instead
[   41.390670] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040008: 0xdead instead
[   41.400242] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0004000c: 0x36eb instead
[   41.410190] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040010: 0x4065 instead
[   41.419735] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040014: 0xf207 instead

Which is pretty ugly and not very inspiring. I would prefer it not try and scan.

There is an option, it is called something like rootfs splitting. I disabled that one. Also had to fix some SIGSEGVs in mount_root tool.