How to install Slackware ARM on a Raspberry Pi
A few days ago I got my Raspberry Pi and I had to decide which OS I install. I like Slackware and decided to give Slackware ARM (formerly ArmedSlack) a try. It was surprisingly easy to install it.
The first step was to download the Slackware ARM installer and copy it to the SD card.
$ wget http://www.daves-collective.co.uk/raspi/images/raspi-slack-installer_01Aug12.img.xz
Write the installer to SD card:
$ xz -dc raspi-slack-installer_01Aug12.img.xz | dd of=[device] bs=65536
In my case I had to replace [device] with /dev/sdb. The next step is to put the SD card in the Raspberry Pi and plug in the power cord. Follow the installer instructions (select keyboard map, etc.) and login as root. Next we have to do is to set the date and time. You can use NTP or the date command (date MMDDHHMMYYYY), e.g. 10:15 05/20/2013:
$ date 052010152013
I used a 16GB SD card but the installer is made for a 2GB SD card, so I had to reconfigure the partition table. I used
$ cfdisk /dev/mmcblk0
for this purpose. The SD card is identified as /dev/mmcblk0. You only have to modify /dev/mmcblk0p3 because the other partitions are needed for the boot process. Modify this partition so it satisfies your claims and don’t forget to write the partition table. Make also sure that the boot flag is set to mmcblk0p1.
The next step is to install Slackware, run
to start the Slackware installer. Add the Swap partition and choose your root partition “/”. Don’t be afraid, the disk formatting process will take some time. The installer will detect a “FAT or NTFS partition”. I added this partition (/dev/mmcblk0p1) to the fstab, but only the user root has read and write access to it. The mount point of this partition is /boot.
The next step is to select the source of the Slackware files. I installed Slackware from a FTP server, so I changed the SOURCE to “Install from FTP/HTTP server”. You can find some FTP servers here.
The next step is to select the packages which should be installed. I deselected the x, kde, kdei, and g series, because I don’t need neither an X-Server nor Emacs. Select all the packages you need/want and start the installation (the installation process will takes some time).
After the installation set up your hostname, network configuration, etc. but DO NOT REBOOT. Exit the setup to go back to the terminal.
I removed some packages which are not needed:
$ ROOT=/mnt removepkg kernel_kirkwood kernel-modules-kirkwood \
kernel_tegra kernel-modules-tegra \
To free a bit of disk space I removed the initrd.gz, because it is not needed anymore and wastes disk space:
$ rm /boot/initrd.gz
The next step is to mount the boot partition of the SD card and install the Raspberry Pi firmware:
$ mount -t vfat /dev/mmcblk0p1 /mnt/boot
$ ROOT=/mnt installpkg /raspi-extra/kernel* /raspi-extra/raspi*
Now you can reboot the Raspberry Pi. If the reboot was successful, you’ll have to login as root. I noticed that the memory was set to 218 MB, because the Raspberry Pi shares the memory with the GPU. But my Raspberry Pi has 512MB RAM and I don’t need much GPU memory, because it is not connected to a monitor. I added the option for the gpu memory split to the /boot/config.txt:
and rebooted the Raspberry Pi. But it didn’t work. The problem was the old firmware, so I updated the firmware. For this purpose I downloaded and installed rpi-update:
$ wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && chmod +x /usr/bin/rpi-update
The next step is to run rpi-update:
After a successfully installing of the new firmware, I rebooted the Raspberry Pi and then the memory split did work:
$ cat /proc/meminfo | grep Mem
I got this output:
MemTotal: 497544 kB
MemFree: 379896 kB
Now the installation of Slackware ARM is complete and you can install and configure further packages and services.