Updating a rfs
Laurent Bercot
ska-dietlibc at skarnet.org
Wed Jul 27 15:54:05 UTC 2011
> this is not a busybox specific issue, but maybe busybox can help me to solve it.
> I have a linux system, which has a ext2 partition mounted as /. Now I
> want to use
> busybox as "ext2-format-and-tar.bz2-extractor" to "install" a new
> version of the rfs.
> (...)
> Is something like this possible? Has anybody experiences with this topic.
What you're basically trying to accomplish is a live firmware update.
It is possible under certain conditions, but it's quite difficult to
do, and dangerous.
- It's difficult because your system will probably have long-running
processes keeping open file descriptors on your old root fs. This can
be worked around, but the way you run your process hierarchy has to be
designed around that and most systems do not. For instance, you will
have to restart your "init" process and few "init" programs make this
easy.
- It's dangerous because you have no fallback if your new root fs
is bad for some reason. Directly overwriting your old root fs is
working without a safety net.
Most people who want to do firmware updates design their system so
there are *two* potential root filesystems, only one is running at a
time, and updating the firmware amounts to unpacking the new archive
into the *offline* one then rebooting on it. If anything fails, the
old root filesystem still works.
--
Laurent
More information about the busybox
mailing list