I'm guessing that the two approaches fail for very different reasons.
/var filesystem hierarchy can not be mounted read-only since the system will be needing to write to it. There is no way around this.
Mounting it as a
tmpfs filesystem seems like a good approach, but such a filesystem will be empty when mounted, and that will make the system fail in other ways.
This can still be a viable option, but you will have to make the system populate the empty
/var hierarchy with the appropriate files and directories straight after mounting it, for example by untaring a pre-packed
/var.tar file (or something), or recursively copying from an existing directory somewhere.
I'm not sure how to do that on Debian. OpenBSD has a memory file system called MFS. When mounting an MFS filesystem, one has the option to pre-populate it with the contents of a directory or an FFS file system on a block device (this may even be done from the
Obviously, the changes to the contents of
/var while the machine is running won't be persistent between reboots without syncing it to an actual disk upon shutdown, which may or may not be a problem in your case.