Created
December 29, 2013 17:19
-
-
Save aarmot/8172527 to your computer and use it in GitHub Desktop.
BeagleBone Black Ubuntu custom setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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