Read-only Raspberry Pi script: how to secure a micro SD card so nothing can be written to it
By Russell Barnes. Posted
Take back control of your online data, with Raspberry Pi.
If you’ve ever built a Pi for a kiosk, installation or information display, you’ll find Adafruit’s read-only Pi script invaluable. This script disables all the write-to-SD-card functions, meaning that you can pull the plug without any risk of data loss or corruption.
The Adafruit script forces Raspbian to store all its temporary data in memory, so no data stored on the SD card can be corrupted. This also means that nothing at all can be written to the SD card.
Adafruit Script puts Raspberry Pi in read-only mode
Script author, and Adafruit Creative Engineer, Phillip Burgess tells us, “We’re seeing Raspberry Pi really take off in situations where a microcontroller may have once sufficed,” and points out that less technical users are making things with a Raspberry Pi. Phillip wanted the ability to simply cut power like one does with an Arduino or a consumer product.
Phillip’s script includes ways to disable read-only mode, by use of a jumper or quick button connect
The script only works on Lite installations – “Stretch or Jessie should work,” Phillip tells us – and you can find the full instructions at Adafruit.
Russell runs Raspberry Pi Press, which includes The MagPi, Hello World, HackSpace magazine, and book projects. He’s a massive sci-fi bore.
Subscribe to Raspberry Pi Official Magazine
Save up to 37% off the cover price and get a FREE Raspberry Pi Pico 2 W with a subscription to Raspberry Pi Official Magazine.
More articles
Take Back Your Clound in Raspberry Pi Official Magazine 165
We’re all-too accustomed to the feling of being watched on the internet. A search for any product leads to adverts, emails, and goodness knows how many bots tracking you. It feels weird and intrusive, and we aren’t being paranoid – they really are watching us. Luckily you don’t have to reply on online services that […]
Read more →
Win one of three Raspberry Pi 4 with 3GB RAM!
Raspberry Pi 4 is still a powerful piece of kit, and this new 3GB version is great for projects and builds that need slightly more than 2GB of RAM but don’t quite need 4GB. We have three to give away and you can enter below. Win 1 of 3 Raspberry Pi 4 3GB
Read more →
Etch A Sketch CNC machine
The software controlling the Etch A Sketch logs the image, turns it into vectors, turns the vectors into G-code, then sends the G-code to the Etch A Sketch – and it was all written by AI
Read more →