Skip to content

Instantly share code, notes, and snippets.

@Akkiesoft
Last active May 20, 2018 07:20
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Akkiesoft/9916490 to your computer and use it in GitHub Desktop.
Save Akkiesoft/9916490 to your computer and use it in GitHub Desktop.
コンパクトなRaspbianを作るやつをベースに自己流にアレンジしたもの。RaspbianがXありで1.2GBちょいのディストリに変身します。NOOBS1.3.4のRaspbianに対応。
#/bin/bash
# コンパクトなRaspbianを作るやつをベースに自己流にアレンジしたもの
# Xもいらないバージョン: https://gist.github.com/Akkiesoft/9873563
#
# ベース: http://www.cnx-software.com/2012/07/31/84-mb-minimal-raspbian-armhf-image-for-raspberry-pi/
# 前のバージョン: https://gist.github.com/Akkiesoft/5426660
sudo apt-get update
rm -rf python_games ocr_pi.png
XPKGS='dillo penguinspuzzle xpdf galculator timidity'
DOCS='libraspberrypi-doc manpages debian-reference-en debian-reference-common'
GCC='gcc-4.5-base:armhf gcc-4.6-base:armhf'
DEV=`sudo dpkg --get-selections | grep "\-dev" | sed s/install//`
MEDIA='omxplayer'
PYTHON='python-pygame python-pifacecommon python-pifacedigitalio python3-pifacecommon python3-pifacedigital-scratch-handler python3-pifacedigitalio python-rpi.gpio python3-rpi.gpio idle-python2.7 idle-python3.2'
JAVA='java-common oracle-java7-jdk'
LEARNING='scratch squeak-vm squeak-plugins-scratch supercollider sonic-pi wolfram-engine'
sudo apt-get remove $XPKGS $DOCS $GCC $DEV $MEDIA $JAVA $LEARNING x2x
# Replace OpenSSH to dropbear (Keep openssh-client) if you want.
# sudo apt-get remove openssh-server
# sudo apt-get install -y dropbear
# Run autoremove, upgrade and clean cache.
sudo apt-get autoremove -y
sudo apt-get upgrade -y
sudo apt-get clean
# Regenerate Swap if you want.
# sudo swapoff -a
# cd /var
# sudo dd if=/dev/zero of=swap bs=1M count=100
# Clear logs if you want.
# 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