Specifications
What it is good for?
In embedded systems the main use of mini_fo is to overlay the root file system. This means it is mounted
on top of the regular root file system, thereby allowing applications or users to transparently make
modifications to it but redirecting these to a different location.
Some examples of why this is usefull are explained in the following sections.
Making a read-only root filesystem writeable
Root file systems stored in flash are often read only, such as cramfs or read only ext2. While this offers major
advantages in terms of speed and flash memory footprint, it nevertheless is often desireable to be able to
modify the root file system, for example to
apply (small) software updates without having to burn a whole new root file system image to flash•
make modifications during developement when frequent changes to the root file system occur.•
This can be achieved by mounting mini_fo on top of the root file system and using a (probably small)
writeable partition as the storage file system. This could be either a JFFS2 flash file system, or during
development even an external hard disk. This has the following advantages:
read-only file systems (fast, small memory footprint) can be used like persistent writable file systems
(in contrast to a ramdisk)
•
slow flash journalling file systems with large flash memory footprint can be avoided.•
Non persistant changes
Ramdisks are often used when the root file system needs to be modified non-persistantly. This works well, but
downsides are the large RAM memory footprint and the time costly operation of copying the ramdisk into
RAM during startup. These can be avoided by overlaying the root file system as in the previous example but
with the difference that the tmpfs file system is used as storage. Thus only modified files are stored in RAM,
and can even be swapped out if neccessary. This saves boot time and RAM!
Resetable changes
Mini_fo can be easily used to implement a "reset to factory defaults" function by overlaying the default root
file system. When configuration changes are made, these are automatically directed to the storage file system
and take precedence over the original files. Now, to restore the system to factory defaults, all that needs to be
done is delete the contents of the storage directory. This will remove all changes made to the root file system
and return it to the original state.
Note: Deleting the contents of the storage directory should only be done when the overlay file system is
unmounted.
Examples
Generally, there are two different ways of overlaying the root file system, which both make sense in different
scenarios.
Starting a single application in a chrooted overlayed environment
What it is good for? 127