No Corrupted Micro-SD Ever! | How To Set Up Your Raspberry Pi To Read Only

preview_player
Показать описание
The final touch on a project, video loopers, kiosks, multi-use terminals and educators managing a classroom full of Raspberry Pi boards are all perfect scenarios for Read-Only system.

Related Information

We are stopping any SD ever becoming corrupted by a Raspberry Pi again! Today we are making our Raspberry Pi Read Only. This is a solution so you can turn your Raspberry Pi handheld computer on and off from the power plug (power cycling it) just like any other appliance in your home! And it can all be done through only one setting. A Read-only Pi is perfect for kiosks, multi-use work terminals, educators managing a classroom worth of Raspberry Pi boards, and completely finished projects that you want the ease of power cycling. With no concern of corruption, your Micro-SD card will be able to run its natural life, which should be 10+ years. With a normally set-up Raspberry Pi, power cycling willy-nilly can cause your Micro-SD card to become corrupted. Lets be clear, when you Safely Shut down the Raspberry Pi what its doing is first checking that it has completely stopped writing new information to the Micro-SD card, and once the Pi is sure, it then stops supplying power to its circuit board. But if it is Read-Only you never need to worry about this. Crontab (a method of getting the software to run on boot) and time synchronisation (pulling the time information from the internet) also work perfectly fine with a Read-Only Raspberry Pi.

Core Electronics is located in the heart of Newcastle, Australia. We're powered by makers, for makers. Drop by if you are looking for:

0:00 Intro
0:13 Read Only and Uses
0:34 Impacts of Read Only
0:58 Raspberry Pi Set Up
1:22 Making It Read-Only
2:53 Demonstration
4:10 Applications
5:00 Reverse the Process
5:47 Outro
Рекомендации по теме
Комментарии
Автор

Brother you save my life with a work project with this video !!! ... Saved me from installing physical "Turn OFF" push button switches on a bunch of PI's located in a very inconvenient hard-to-reach location at work.... THANK YOU SO MUCH ! ❤❤❤ 😊

azucar
Автор

Sweet guide! is there a guide for read only using tmpfs instead? thanks

miston
Автор

It is nice easy way. But there is another better solution. You can switch to ZFS filesystem. In that case you can revert filesystem state to any time of the past. Snapshots made with interval, hourly, daily, as often as you wish so.

ighor
Автор

I have just the opposite problem ... I am using various Linux distributions for years now. Recently a friend of mine convinced me to try playing around with a Raspberry Pi cluster, so I ordered 4 to start with. One of the Pis had already a corrupted SD card delivered with it and none the things I tried on various OSes was able to remove that internal bit that acts as write-protection and so this SD card is pretty much unsuable. I am now in discussions with the vendor who blames me for not knowing what I'm doing ... I though had a spare SD card from a camera I used before so I was able to still play around with all 4 Pis.

So, in the past week I tried various things with those Pis. I installed various applications, tried some typical networking stuff and ended up with a k3s cluster where I have installed a couple of pods, services and ingresses that seemed to work. Today I installed a couple of updates and rebooted each of the Pis. 3 of them came up as expected and I could log in via SSH and continue work. But one of them wasn't responding at all. All the Pis run headless using a PoE (not +!) splitter that so far worked great. But the downside here is, in case of an error I can't plug my monitor and a power supply that way. Technically I can plug my monitor to it, but the power supply isn't strong enough to deliver a picture to my monitor though. As I am aware that SD cards may get locked when not properly shutting them down via 'sudo halt' and waiting till the power led turns off, I even connected a keyboard to the Pi and repeated the commands I entered visually in a SSH shell connected to one of the other Pis to perform a regular system halt. The Pi in the ssh shell did turn off properly, but the Pi I tried to shut down didn't take the commands I entered and was still running. So, at one point I crossed fingers and simply unplugged the power. But on connecting monitor and the original power cable and restarting the Pi I was stuck in the boot screen and on pressing ESC the filesystem just stated to run fsck on the disk as some failures were found. Problem now is, that card got locked for some unknown reason and no matter what I try that bit remains set. As if that wasn't bad enough, the Pi I used to shut down via SSH now also is corrupt even though I didn't touch the SD card, the power supply or anything on it and now within 2 weeks 3 out of 5 SD cards I have are corrupt ...

I'm using Linux for almost 15 years now on a daily basis and I never had that many problems with it like in these two weeks with those Pis ... And I even took the SD cards everyone was recommending. So, if anyone has some tipps on how to remove that bit that locks the SD cards so that I actually can perform fsck cleanup and stuff on the card or even better wipe all of the contents all togethre and start from fresh, please ping me ...

Kessra
Автор

Cheers for the guide. What is the lifetime of an information kiosk of i.e. 64gb of books being read 12h/day for a number of years? will the SD card hold for 2-3-4 years? I think after 5 years the charge of the bits will fail, and perhaps reading a cell many times an cause current leakage to surrounding bits and change them too.

batgroupcraft
Автор

I was looking to do this on a few Raspberry Pi Zeros I have as it would have been perfect for my use case, however Performance Options isn't there in the raspi-config. Do you know if the Overlay Filesystem is not an option on Raspbian Lite or perhaps not on the Zero's due to smaller amount of RAM? I'm struggling to find similar reports of this problem on Google on the Pi Forums, but I've checked on a variety of my Pi Zero's of different ages and cannot see it on any.

ashleycawley
Автор

Hey there,
I think I accidently did it on my Raspberry Pi but I am using an ubuntu OS so the raspi-config command is not working for me.
How can I resolve this?

tamir
Автор

pi-star has being doing this for years

davepickering
Автор

Can I write to external USB storage in read only mode ?

amitsharma-cswh
Автор

So, what happens if i activate the overlay file system but do not set the boot partion to readonly?

Svarsmannen
Автор

I am using sandisk sd card i had done some flash i. Fourth flash i got verifying failed in rasperry pi imager software😢😭 please help me

----tceect----
Автор

I wanted to change the ip addresses but its only read only. Please help. How do i change it to writable.

dipakbudhathoki
Автор

This video fails to deliver for me, and I am an experienced Linux user and embedded firmware developer.
After much grief with rPi and corrupted SD cards (Samsung and PNY) I finally made the boot partition read only using these instructions, confirmed it was read only, and my Pi Zero W yet again corrupted the boot partition on power failure. This only happens regularly when using Raspberry Pi devices. Why they don't boot by default with an initramfs strategy just blows my mind.

beerden