I have Cubieboard2 with Lubuntu image on NAND. I have a script that is frequently updating a file. Since NAND memory is not quite suitable for such frequent changes (because of wear-out of the memory cells over time), I've created filesystem in RAM memory.
I created easy step by step guide: http://homecircuits.eu/blog/ubuntu-data-in-memory-disk/ (http://homecircuits.eu/blog/ubuntu-data-in-memory-disk/)
mkdir -p /home/linaro/projects/memdisk
sudo chown linaro:linaro /home/linaro/projects/memdisk
sudo mount -t tmpfs -o size=10M,mode=0755 tmpfs /home/linaro/projects/memdisk
I used tmpfs and not ramfs. Tmpfs is using swap but cubieboard lubuntu image doesn't have swap, so you can't put more data than you specify.
I created 10MB tmpfs and did some test to put some more bytes to that folder. Without swap it was not possible. I'm ok with such behaviour so I'm sure that no data are stored on NAND.
Is there a better way to put such changing data in memory and not on NAND?