Skip to content

Instantly share code, notes, and snippets.

@aarmot
Created December 29, 2013 17:19
Show Gist options
  • Save aarmot/8172527 to your computer and use it in GitHub Desktop.
Save aarmot/8172527 to your computer and use it in GitHub Desktop.
BeagleBone Black Ubuntu custom setup
# To reduce eMMC wear remap write-intensive directories to memory fs
# Mount /tmp into tmpfs
sudo echo "tmpfs /tmp tmpfs defaults 0 0" >> /etc/fstab
sudo rm -rf /var/tmp && ln -s /tmp /var/tmp
# Mount /var/log into tmpfs
sudo cat > /etc/init/mount-log.conf <<EOT
start on startup
task
script
mount -t tmpfs -o size=20%,mode=0755 logfs /var/log
mkdir /var/log/upstart /var/log/apt /run/logrotate
end script
EOT
# Trim log history
sudo sed -i -e 's/^weekly$/daily/' -e 's/^rotate .*/rotate 2/' -e 's/^#compress/compress/' /etc/logrotate.conf
sudo sed -i -e 's|/var/lib/logrotate|/run/logrotate|' /etc/cron.daily/logrotate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment