Compare commits

..

2 commits

3 changed files with 22 additions and 0 deletions

View file

@ -21,6 +21,7 @@ Items marked ```REQUIRED``` are assumed to be setup and working. You've been war
* [System Monitoring (REQUIRED)](monit.md) * [System Monitoring (REQUIRED)](monit.md)
* [CPU Governor (VERY SMART)](cpu_governor.md) * [CPU Governor (VERY SMART)](cpu_governor.md)
* [Logs in RAM (log2ram / VERY SMART)](log2ram.md) * [Logs in RAM (log2ram / VERY SMART)](log2ram.md)
* [Apt use RAM (VERY SMART FOR 4Gb RAM)](apt_cache_tmpfs.md)
* [Pimoroni Fan Shim](pimoroni_fan_shim.md) * [Pimoroni Fan Shim](pimoroni_fan_shim.md)
* [HDMI Scheduled On/Off](scheduled_display.md) * [HDMI Scheduled On/Off](scheduled_display.md)
* [Backups via restic](restic.md) * [Backups via restic](restic.md)

18
docs/apt_cache_tmpfs.md Normal file
View file

@ -0,0 +1,18 @@
# tmpfs apt cache
**Please Note: this will use 512M RAM for the tmpfs (it'll usually be smaller) and can cause apt automatic updates to fail. You'll need/want to watch your logs and automatic updates if using this setup.**
The below commands will enable tmpfs (in memory filesystem) for ```/var/cache/apt``` which has heavy disk write turnover due to automatic updates.
``` sh
sudo -sHu root
rm -r /var/cache/apt/*
cat >> /etc/fstab <<EOF
tmpfs /var/cache/apt tmpfs size=512M,defaults,noatime,nodiratime 0 1
EOF
mount /var/cache/apt
df -h /var/cache/apt
```

View file

@ -5,6 +5,9 @@ The below will setup nightly automatic update and reboots for the PiFrame. This
``` sh ``` sh
apt install unattended-upgrades apt install unattended-upgrades
nano -w /etc/apt/apt.conf.d/10periodic
APT::Periodic::AutocleanInterval "1";
APT::Periodic::CleanInterval "1";
nano -w /etc/apt/apt.conf.d/50unattended-upgrades nano -w /etc/apt/apt.conf.d/50unattended-upgrades
Unattended-Upgrade::Mail "user@domain.tld"; Unattended-Upgrade::Mail "user@domain.tld";
Unattended-Upgrade::Automatic-Reboot "true"; Unattended-Upgrade::Automatic-Reboot "true";