Not use squasfs

Is it possibile to use just ubifs and have rom r/w?
For example in the r7800 i have 2 image after compile, sysupgrade that is squashfs and an ubi image? what is the use of that? tried to flash it with sysupgrade but no luck...

For most targets that is not directly supported. Having only the R/W ubifs filesystem would also remove the reset capability (which relies on cleaning the R/W partition and starting with just the R/O squashfs partition.)

On ancient times, there was the selection between R/W jffs2-only and (R/O squashfs + R/W jffs2) combo, but as the writable jffs2-only file system proved problematic for many users (as there is no reset possibility), the devs decided to normally provide only the (R/O squashfs + R/W something) combo.

(in newest router the R/W something is ubifs, while it used to be jffs2)

then why provide ubifs image? and wouldn't be good to have an option to the menuconfig?

Probably because it is used as a wrapper around the squashfs image (or vice versa) during the image build process. Possibly because the OEM bootloader (or flash routine) expects an ubifs image. Or something like that.

The image commands are here:
r7800 factory image:;a=blob;f=target/linux/ipq806x/image/Makefile;hb=HEAD#l223
leads to DniImage:;a=blob;f=target/linux/ipq806x/image/Makefile;hb=HEAD#l61
leads to append-ubi:;a=blob;f=include/;hb=HEAD#l177

I haven't bothered to figure out the exact sequence why that ubifs image gets created...

But generally enabling the "R/W only" images tended to cause more trouble, so those were disabled for old target platforms (like ar71xx, jffs2 disabled in 2013), and were never really enabled for new ones (like ipq806x).

Additional major reason for SquashFS is the resulting filesystem ends up a whole lot smaller than the same contents in JFFS2. I have this 4MB flash device that won't even fit the kernel modules if it's JFFS2 entirely, yet ADDED LuCI and I have ~300KB free with the Squash/JFFS2 hybrid as normal.

If you want SquashFS to hold your changes, build a custom image with everything applied into SquashFS and reflash. Technically that's "writable" squashfs... just takes longer and some effort.

Hi hnyman,

How can I generate R/W jffs2 for MT7688?

Thank you!

Not sure, but you could try adding jffs2 as a feature to the target's Makefile. I am not sure if support for that has ever existed for your target, so you might need to do some Makefile browsing and coding.

Mainly the support for pure jffs2 has been remvoved from various targets since about five years. Looking at those commits may give you hints for doing the opposite actions.