raspbian stripping


The raspberry pi sitting in my parents cupboard only handles some ssh and rsync stuff. I installed the default raspbian image. Now I will strip this device to a minimum bare state. This means, getting rid of all X stuff (it’s headless).

First check some processes ($ps aux) I think not really needed

root 1312  0.0  0.1   1744   512 ?        S    May13   0:23 /usr/sbin/ifplugd -i eth0 -q -f -u0 -d10 -w -I
root 1340  0.0  0.1   1744   504 ?        S    May13   0:04 /usr/sbin/ifplugd -i lo -q -f -u0 -d10 -w -I
#Brings networks interfaces up and down automatically when the cable is removed / inserted. The ethernet cable is always inserted (without this device is useless)
$ sudo update-rc.d ifplugd remove

ok this is a bit of a nasty one. ifplugd is also controlled by some udev-rules
(look in /etc/default/ifplugd, it mentions /lib/udev/ifplugd.agent)

first alter /etc/network/interfaces:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp

then alter the one line in /lib/udev/rules.d/60-ifplugd.rules to
#SUBSYSTEM==”net”, RUN+=”ifplugd.agent”

ok network still runs. now ifplugd can be removed from the system ($sudo apt-get purge ifplugd)

nobody 1557  0.0  0.1   2012   636 ?        Ss   10:49   0:00 /usr/sbin/thd –daemon –triggers
/etc/triggerhappy/triggers.d/ –socket /var/run/thd.socket –pidfile /var
#Short-Description: triggerhappy hotkey daemon
$ sudo update-rc.d triggerhappy remove

root 1841 0.0 0.1 2060 732 ? Ss+ May13 0:00 /sbin/getty -L ttyAMA0 115200 vt100
#Spawn a getty on Raspberry Pi serial line
$ vi /etc/inittab => remove or comment respawn line

root 1773 0.0 0.7 26520 3684 ? Sl 10:49 0:00 /usr/sbin/console-kit-daemon –no-daemon
root 1840 0.0 0.5 22320 2928 ? Sl 10:49 0:00 /usr/lib/policykit-1/polkitd –no-debug