Skip to content

Instantly share code, notes, and snippets.

@Akkiesoft
Last active December 16, 2015 11:19
Show Gist options
  • Save Akkiesoft/5426660 to your computer and use it in GitHub Desktop.
Save Akkiesoft/5426660 to your computer and use it in GitHub Desktop.
コンパクトなRaspbianを作るやつ( http://www.cnx-software.com/2012/07/31/84-mb-minimal-raspbian-armhf-image-for-raspberry-pi/ )を要約しつつちょっと追加したりしたもの
#/bin/bash
# コンパクトなRaspbianを作るやつを要約しつつちょっと追加したりしたもの
# 元: http://www.cnx-software.com/2012/07/31/84-mb-minimal-raspbian-armhf-image-for-raspberry-pi/
sudo apt-get update
rm -rf python_games
sudo rm -rf /opt/*
sudo apt-get remove -y x11-common midori lxde python3 python3-minimal lxde-common lxde-icon-theme omxplayer gcc-4.4-base:armhf gcc-4.5-base:armhf gcc-4.6-base:armhf ca-certificates libraspberrypi-doc xkb-data fonts-freefont-ttf locales manpages `sudo dpkg --get-selections | grep "\-dev" | sed s/install//` `sudo dpkg --get-selections | grep -v "deinstall" | grep python | sed s/install//` `sudo dpkg --get-selections | grep -v "deinstall" | grep x11 | sed s/install//` `sudo dpkg --get-selections | grep -v "deinstall" | grep sound | sed s/install//` `sudo dpkg --get-selections | grep -v "deinstall" | grep ssh | sed s/install//`
sudo apt-get install -y dropbear
sudo apt-get autoremove -y
sudo apt-get upgrade -y
sudo apt-get clean
# スワップの再作成はおこのみで実行
sudo swapoff -a
cd /var
sudo dd if=/dev/zero of=swap bs=1M count=100
#ログのクリア
cd /var/log/
sudo rm `find . -type f`
history -c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment