I am required to write some software to run on Linux installed on an x86 based embedded setup that has a 8GB compact flash drive for data storage. The critical requirements are logging measurement data to file every 30 seconds, and robustness to power loss (my system MUST be able to reboot successfully every time and logging data must not get corrupted). I have used buildroot to generate my kernel, crosstools and file system. Currently I have tried 2 things
- Booting up using only the
.cpiofile system provided by buildroot.
- Copying the file system to an
ext3partition and telling syslinux that the root file system is located there.
If I use option 1. and have my root file system in RAM I will lose my data at power down. If I use option 2. then I run the risk of system files getting corrupted on power down. The answer to this question Is using a read only root file system a good idea for embedded setup? lead me to consider using a read only file system, but the only answer I have received is currently too advanced for my level of Linux expertise. This has lead me to consider using a RAM based file system. In the case of a RAM file system using the
.cpio file to boot from, how could I possibly operate things so that I can ensure power down safety AND get persistent data storage for my data logging requirements ?