I am working on embedded linux. I am trying to protect my rootfs by making it read only and mount fs file from the sdcard over the root.
I need both fs to be merged. Any writes can be redirected to the fs file onto the sdcard. Reading from the read only rootfs still possible.
I tried the following:
$ cd /media/sdcard
$ mount userfs /
$ cd /
$ echo a > a.txt
But I receive error: -sh: a.txt: Read-only file system
Can any one help me to implement the needed functionality ?