Identifying UBI volume instance / storing UBI volume metadata

Rafał Miłecki zajec5 at gmail.com
Thu Dec 9 14:14:38 PST 2021


On 9.12.2021 21:11, Olivier Valentin wrote:
> How about storing the squashfs into the rootfs ubi volume (as a bare file), start with an initramfs appended to the kernel and mount the root file with loopback block dev. The RW overlay part would be stored directly in the ubifs. (All modifications to the root image file would go in the overlay, so impossible to break the image)
> 
> This way, when you flash a new firmware, everything gets wiped, and you can factory reset by rm the RW directory.
> 
> It diverges quite a bit from OpenWRT usual way though.

Thanks for your reply. It doesn't fit OpenWrt's current design well but
I think it's probably time to rework OpenWrt's init if needed.

Just to make sure I understood your correctly:

Do you suggest "rootfs" UBI volume using ubifs with something like:
/root.squashfs
/overlay/

(and then initramfs as you described)?



More information about the linux-mtd mailing list