Micro-SD cards can make Raspberry Pi projects less durable, particularly when power can be yanked at any time. This project log describes how to reduce SD card corruption with the rarely used TMP_WRITE_PROTECT feature in the SD card standard. It's a big hammer (love those!) and works well with DQMusicBox.
The DQMusicBox project already does SD card write *reduction* by using DIetPi and RAM logging. Thus, engaging TMP_WRITE_PROTECTION is optional. I love saying "optional" to a group of hackers -- it's like bait!
I was inspired to do this by the SD Locker project that I saw here on Hackaday. But I wanted to use a Pi to do this. So I setup a Pi 3 that boots from a USB thumb drive. I installed sdtool. Now when I want to TMP_WRITE_PROTECT a micro-SD card, I just pop it in the slot and run sdtool from the command line. Here is the rig that I use:
The slightly tricky bit was getting the Pi 3 to boot from USB. I used DietPi as it has setup support for USB booting. Detailed instructions for setup and use.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.