I’ve recently read about how to fix corrupted SD-cards in Raspberry Pis. Corruption can happen when the Pi is unexpectedly losing power during a write to the SD card.
To avoid corruption, you can change the (boot partition of the) SD to read-only, requiring either USB storage (flash/HDD/SSD) or a writable secondary partition on the SD card) if you need to save anything locally. The system itself will run fine without write access. Only your files could be at risk if you lose power mid-write.
You can also configure your system to boot from USB storage instead of SD card. Keeping the system partition read-only is probably still a good idea, if possible in your setup.
Modern versions of raspi-config offer a similar read-only overlayFS functionality out of the box! sudo raspi-config, go to Advanced Options, then enable the Overlay FS: Enable/Disable read-only filesystem feature.
Source: Shane S. @ …stackexchange.com/…/how-can-i-prevent-my-pis-sd-…
themurphy@lemmy.world 1 year ago
I can recommend Log2Ram for that. It logs to RAM and only writes to the SD card once a day (or more/less, if you choose).
It’s a must while using PiHole imo.
Link to guide
Tranus@programming.dev 1 year ago
You formatted your links as images. Markdown uses  for images, […](…) for links.
JigglySackles@lemmy.world 1 year ago
I appreciate the links to log2Ram. I’ll try when I get a new pi.