Change your SD card to a read-only mode.
http://raspberrypi.stackexchange.com/questions/5112/running-on-read-only-sd-card
https://web.archive.org/web/20150101110424/http://raspberrycenter.de/forum/umruestung-raspberry-pi-read-only-root-filesystem
in:
$ sudo nano /etc/fstab
change:
/dev/mmcblk0p2 / ext4 defaults,noatime,ro 0 1 tmpfs /tmp tmpfs defaults,size=30M 0 0
disable rsyslog and dphys-swapfile:
Wheesy:
$ sudo update-rc.d -f rsyslog remove $ sudo update-rc.d -f dphys-swapfile remove
Jessie:
$ sudo systemctl disable rsyslog $ sudo systemctl disable dphys-swapfile
To remount the partition writabe:
$ sudo mount / -o remount,rw