Read-only Raspberry Pi script: how to secure a micro SD card so nothing can be written to it
By Russell Barnes. Posted

Advertisement
Introducing the smarter desktop: use cloud apps, thin clients, and get real work done on a Raspberry Pi. Also in the magazine we’re building a digital jukebox, controlling a robot arm, storing…
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

Picocomputer 6502
The Picocomputer 6502 is truly open-source hardware.
Read more →

CrowPi 3 review
An electronics playground with added AI lessons for Raspberry Pi, Pico, and more.
Read more →

Network mapper
It’s not as efficient as reading a table of figures, but we love this display anyway.
Read more →
Sign up to the newsletter
Get every issue delivered directly to your inbox and keep up to date with the latest news, offers, events, and more.