These steps will provide a read-only OctoPi installation while still having a read/write home directory. In other words, as long as you don't have to update system files, this installation will be fully functional.
- Install OctoPi on a 8GB (or more) SD card and boot it at least once.
- Mount it with a Linux machine (e.g. Ubuntu).
- Use
sudo gpartedand configure the remaining space as EXT4. - There are now three partitions. Mount the last two.
- Move
/home/pito the new and empty partition. - Edit
/etc/fstab:- Add
roto the options of/dev/mmcblk0p2 - Append
/dev/mmcblk0p3 /home ext4 defaults,noatime 0 2
- Add
- Unmount the SD card and boot OctoPi.
- Temporary mount the filesystem read-write using
sudo mount -o rw,remount /. - Replace
syslogwith an in-memory alternative:- Run
sudo apt-get install busybox-syslogd - Run
sudo dpkg --purge rsyslog - You can read the syslog using
logread
- Run
- Edit
/etc/default/tmpfs:- Uncomment and change
RAMTMPtoyes - Uncomment
TMPFS_SIZE
- Uncomment and change
- Run
sudo systemctl enable tmp.mount. - Symlink
/etc/resolv.confto a read-write location, so your DNS servers get updated byresolvconfservice:- Run
sudo rm /etc/resolv.conf - Run
sudo ln -s /var/run/resolv.conf /etc/resolv.conf - Edit
/etc/resolvconf.confand changeresolv_confto/var/run/resolv.conf
- Run
- Edit
/etc/default/webcamd:- Change
LOGto/tmp/webcamd.log
- Change
- Reboot!
To mount the filesystem for read/write, simply use sudo mount -o rw,remount /. This will be reverted on next boot.
Note that the /home/pi folder is still read/write. If the power fails, any files (logs, plugins, timelapses) written to that partiton may be lost, but the system is still capable of booting (and recovering).
Yes, that should be possible, in theory. But I don't know if any services depend on
/home/piwhile booting, and if that directory is mounted on time. NFS should be a decent way to mount it externally, in this case.