Minimal CRUX-ARM installation
CRUX-ARM is a Linux distro for ARM devices like the Raspberry Pi that follows the KISS philosophy. If you're looking for a minimalistic system you might want to have a look at the construction kit.
I'm using CRUX-ARM on one of my Raspberry Pi's. The installation fits on a 1 GB memory card. On the project's wiki there is a manual for installing the system: [click me!]
The basic installation consists of some unneeded packages that can be removed:
1# prt-get listinst|less
2# prt-get remove reiserfsprogs xfsprogs jfsutils pciutils btrfs-progs hdparm sudo ppp exim mlocate
3# prt-get remove mlocate
4# groupdel mlocate
To make SSH work you need to customize the file /etc/hosts.allow
and the daemon autostart configuration:
1# echo "sshd: ALL" >> /etc/hosts.allow
2# vi /etc/rc.conf
3...
4SERVICES=(net crond sshd)
5
6ESC ZZ
It is also a good idea to alter the paging behaviour and the daily rdate
cron job:
1# echo "vm.swappiness=0" >> /etc/sysctl.conf
2# vi /etc/cron/daily/rdate
3...
4/usr/bin/rdate -nav pool.ntp.org
5
6ESC ZZ
Because this installation doesn't need any graphical software you can disable the Xorg repositories:
1# mv /etc/ports/xorg-arm.rsync /etc/ports/xorg-arm.rsync.inactive
2# mv /etc/ports/xorg.rsync /etc/ports/xorg.rsync.inactive
3# vi /etc/prt-get.conf
4...
5#prtdir /usr/ports/xorg-arm
6#prtdir /usr/ports/xorg
7
8ESC ZZ
9
10# rm -Rf /usr/ports/xorg*
In my case the firmware only detected 128 MB memory - the reason for this effect is an outdated firmware version. Using a tool named rpi-update this firmware can be updated easily. During the update also a new kernel is installed - after rebooting the system old kernel modules can be removed. The update also installs some tools for maintaining the single board computer - to use these tools you need to update the library cache:
1# wget --no-check-certificate http://goo.gl/1BOfJ -O /opt/bin/rpi-update
2# chmod +x /opt/bin/rpi-update
3# rpi-update
4Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS
5Performing self-update
6ARM/GPU split is now defined in /boot/config.txt using the gpu_mem option!
7We're running for the first time
8Setting up firmware (this will take a few minutes)
9Using HardFP libraries
10If no errors appeared, your firmware was successfully setup
11A reboot is needed to activate the new firmware
12# reboot
13# rm -Rf /lib/modules/3.6.11
14# echo "/opt/vc/lib" > /etc/ld.so.conf.d/vc.conf
15# ldconfig
It is a good idea to install all available updates afterwards:
1# ports -u ; prt-get diff
2# prt-get sysup
Because CRUX-ARM is a source-based Linux distro all updates are compiled which can take a lot of time. "Installing" all updates took a complete day for me.
For impatient users I uploaded all update packages that were available when I wrote this article: [click me!]
1# wget --mirror -nH --cut-dirs=100 http://crux.stankowic-development.net/rpi/packages --accept="*.pkg.tar.gz"
2# for i in *.pkg.tar.gz ; do pkgadd -u $i; done
There is also an image of my CRUX installation available: [click me!]