[OpenWrt-Devel] rootfs_data on separated flash
Rafał Miłecki
zajec5 at gmail.com
Sun Dec 14 15:37:18 EST 2014
On 14 December 2014 at 19:55, John Crispin <blogic at openwrt.org> wrote:
> gregley sent a extroot ubi support patch.
>
> with this in place 2 scenarios are possible.
>
> 1) install rootfs on your spi and with a extroot default config that
> will copy the whole content over to the ubi. magic markers might be
> required here. currently extroot write a magic file to the external
> storage to make sure that the extroot is in sync with the kernel to
> ensure kmod compatibility.
>
> 2) we patch the splitter and extroot so that extroot is only used for
> the overlay.
>
> personally i would favour 1) a nand tends to be quite big and i am not a
> fan of using overlay on it. there is no real techincal reason i just
> think its a cleaner solution.
>
> what do you think about these approaches ?
I like your 1) idea. It sounds like a standard extroot just configured
automatically, hope I got it right.
I think I'd just prefer to use pivot-overlay instead of pivot-root you
suggested. Few reasons:
1) No need to care of copying all "rootfs" files.
2) Less integration changes/checks. E.g. I'm not sure if "firstboot"
command would work with pivot-root.
3) Saving a bit of space.
4) Much easier to manage in some cases like a failsafe. You can
clearly see which files have been modified when using overlay.
To be honest, I've already implemented some similar solution today:
1) I've modified DT to create "ubi" MTD partition on NAND
2) Wrote a simple preinit_main script creating "rootfs_data2" UBI volume
3) Modified fstools to prefer rootfs_data2 over rootfs_data if it exists
In other words I implemented pivot-overlay solution without using
fstab. But I think your idea may be nicer because of some
compatibility with existing solutions.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list