I'm trying to make a read-only file-system (Raspbian). One common way is to place some directory (that are to be writable) in a tmpfs.
Example, I found some tutorials that suggest:
rm -rf /var/lib/dhcp/ /var/run /var/spool /var/lock ln -s /tmp /var/lib/dhcp ln -s /tmp /var/run ln -s /tmp /var/spool ln -s /tmp /var/lock
tmpfs /tmp tmpfs nosuid,nodev 0 0 tmpfs /var/log tmpfs nosuid,nodev 0 0 tmpfs /var/tmp tmpfs nosuid,nodev 0 0
as far as I understand:
/var/lockare symlinked to
/tmpthat is mounted as tmpfs
/var/tmpare mounted on separated tmpfs
Why you can't mount just
/tmp as tmpfs and symlink there all the other directories?