Mini Guide: Read only Raspberry Pi (without NFS)

Mini Guide: Read only Raspberry Pi (without NFS)
Without NFS

Note: This note was originally in the Raspberry Pi, overlayfs read-write root, read-only NFS base post.

This setup described in the article above also works without the NFS setup.

As we plan to have no 'proper' storage and RAM limits the size of writes we can store there's no point having a swap file.

sudo dphys-swapfile swapoff
sudo dphys-swapfile uninstall
sudo update-rc.d dphys-swapfile remove

Update Ubuntu and the firmware, etc:

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get upgrade
sudo BRANCH=next rpi-update

Then reboot.

Create the initramfs:

sudo mkinitramfs -o /boot/initrd

Add the script and make it executable.

sudo curl -o /bin/
sudo chmod +x /bin/ 

Edit /boot/config.txt, adding:

initramfs initrd followkernel

Edit /boot/cmdline.txt, adding:


And now reboot again and it's done, the changes made to the original script to use /proc/mounts over /etc/fstab seem to work in both cases.