Mount /boot read only
authorJoseph Coffland <joseph@cauldrondevelopment.com>
Fri, 29 Sep 2017 06:40:19 +0000 (23:40 -0700)
committerJoseph Coffland <joseph@cauldrondevelopment.com>
Fri, 29 Sep 2017 06:40:19 +0000 (23:40 -0700)
scripts/setup_rpi.sh

index 7c3b266a3e1186e579f9ed9e76048e04d9ef66ab..a3aa2a849fa7669bab49724f3420c7b091571866 100755 (executable)
@@ -67,6 +67,9 @@ pip-3.2 install --upgrade tornado sockjs-tornado pyserial smbus
 # Clean
 apt-get autoclean
 
+# Mount VFAT boot partition read only to avoid corruption
+sed -i 's/\(vfat[[:space:]]\+defaults\)[^[:space:]]*/\1,ro/' /etc/fstab
+
 # Change hostname
 sed -i "s/raspberrypi/bbctrl$ID/" /etc/hosts /etc/hostname