jffs2 root fs: how to overwrite it?
I have a jffs2 root file system. As part of the user upgrade process, running from linux, I need to blow the root fs away and replace it with a new version. One solution is to reserve a second piece of flash for this purpose, copy it there on user request and instruct u-boot to handle the copy, but I'd like not to waste the flash space. Ideally, I'd have an inittab shutdown script umount root (if this is possible) and copy an image from mem -> flash before rebooting. Or something of that sort.
How else do people accomplish this? Thanks for your comments.
Kylo
Quoted 3 lines · Kylo Ginsberg
I have a jffs2 root file system. As part of the user upgrade process, running from linux, I need to blow the root fs away and replace it with a new version.
For posterity: the tool I was looking for was pivot_root.
Cheers,
Kylo