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://github.com/EternityForest/KaithemAutomation/blob/master/scripts/linux-sd-protect.sh">https://github.com/EternityForest/KaithemAutomation/blob/mas...</a><p>Current version doesn't disable swap, that's in a separate optional file, but the next version will probably have it all in one file.<p>It can't be done in a one size fits all script unless you're launching chromium the same way, but do something like:
```
mkdir -p /dev/shm/kiosk-temp-config
mkdir -p /dev/shm/kiosk-temp-cache
export XDG_CONFIG_HOME=/dev/shm/kiosk-temp-config
export XDG_CACHE_HOME=/dev/shm/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's only once an hour, but having a hardware RTC would really be ideal.