TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Pi Reliability: Reduce writes to your SD card

2 pointsby kuba-orlikabout 1 year ago

1 comment

eternityforestabout 1 year ago
My SD protection script, a few months old and may need some updates since a lot seems to have changed in Pi OS:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;EternityForest&#x2F;KaithemAutomation&#x2F;blob&#x2F;master&#x2F;scripts&#x2F;linux-sd-protect.sh">https:&#x2F;&#x2F;github.com&#x2F;EternityForest&#x2F;KaithemAutomation&#x2F;blob&#x2F;mas...</a><p>Current version doesn&#x27;t disable swap, that&#x27;s in a separate optional file, but the next version will probably have it all in one file.<p>It can&#x27;t be done in a one size fits all script unless you&#x27;re launching chromium the same way, but do something like: ``` mkdir -p &#x2F;dev&#x2F;shm&#x2F;kiosk-temp-config mkdir -p &#x2F;dev&#x2F;shm&#x2F;kiosk-temp-cache export XDG_CONFIG_HOME=&#x2F;dev&#x2F;shm&#x2F;kiosk-temp-config export XDG_CACHE_HOME=&#x2F;dev&#x2F;shm&#x2F;kiosk-temp-cache ```<p>In your launch script and you should be able to stop the worst offender on kiosk systems.<p>Certain apps just love writing to disk, which is part of what keeps me from moving to Home Assistant for a lot of things.<p>I typically leave fake hwclock alone since it&#x27;s only once an hour, but having a hardware RTC would really be ideal.