Slackware ARM on a Raspberry Pi
Choosing a suitable SD/microSD card
In order to boot the Raspberry Pi you need to prepare a microSD card. This tutorial covers preparation of a microSD card for both Linux and Windows users. Size matters because a 16GB microSD card is required to complete a full install, and that will leave you with a moderate amount of free space to work with (Slackware requires approx. 9GB of storage capacity for a full installation). The type of microSD card you use *is* important because cards vary greatly in performance. For example, a class 10 card will be much faster at reading and writing than a class 4 card. Therefore, the time it takes for you to run a program, or complete an installation, with a faster card will be much shorter. Be aware that "The faster the microSD card, the better it is!" does not always apply.
Throughout this SARPi tutorial there are references to 'SD cards' and 'microSD cards'. Your Raspberry Pi is made to support one or the other, depending on the device model/version. It makes no difference when installing Slackware if you use a SD card, microSD card, or microSD card with SD card adapter. So, just use whichever card(s) you have and treat them as the same thing.
At SARPi.co.uk we have found the Kingston UHS-I U3 range of microSD cards to be relatively inexpensive and 100% trouble-free while running Slackware ARM on the Raspberry Pi. They are very reliable and extremely quick at reading and writing data, out-performing most other microSD cards from PNY, Sandisk, Samsung, etc.
Windows users click here for instructions on how to configure your microSD card.
Configure a microSD card to install Slackware ARM... Linux Users
We will be using a Slackware64 14.1 Linux system to prepare a microSD card. If you are using another Linux distribution the command structure may be a little different (e.g. you have to type 'sudo' before a command on some systems). We have given the name 'mynixbox' to our Linux system and we are using a 32GB microSD card (Kingston UHS-I U3). Using larger capacity microSD cards works too! You might struggle using 8GB microSD cards as a full install requires just over 9GB of storage capacity, so you will have to omit some packages during the install process. Of course, it's still possible to install Slackware ARM on an 8GB microSD card and experienced Slackware users will already know what to do under these circumstances. If you're installing Slackware ARM for the first time, it's recommended you go for a full installation on an 16GB (or larger) microSD card.
So, assuming you have, at least, a 16GB microSD card, here's what you need to do:
• put the microSD card into the card reader of your Linux system
• login as root user
• at the command prompt type the following command:
This will give you details of all the drives currently connected to your system. You're looking for the microSD card device you've just plugged in. On our system we received the following information:
So we now know that our microSD card is device /dev/sda on the system. That's the important bit. We can also see there is no file system on the card. It's blank. Yours may have existing data and/or file systems. Be sure you do not use a microSD card that contains important information because this process will overwrite everything!
Next, you're going download a SARPi Slackware ARM installer image file. These installers are optimised for the Raspberry Pis and were built using the official Slackware ARM mini root filesystem and kernel and firmware from the official Raspberry Pi Foundation GitHub Repository. The SARPi installers support soft float port and hard float port versions of Slackware ARM. You should decide which version best suits your needs.
All the available SARPi installer images are available from the Downloads section.
• For the purpose of this tutorial we will be installing Slackware ARM -current hard float port on a Raspberry Pi 3.
• When installing a different version of Slackware ARM you will not be using the same installer image. The filenames will be slightly different, although the installation procedure is identical. So, bear that in mind throughout this tutorial.
Before downloading a SARPi installer image, you are going to change to the /tmp directory. At the command prompt type the following:
root@mynixbox:/tmp# wget http://sarpi.co.uk/files/rpi3/current/img/sarpi3-installer_slackcurrent_10Feb18_sp1.img.xz
You may also want to verify the integrity of the installer image file using the md5 checksum. If so, type the following:
Now you can check to see if the contents of the installer image are genuine. You should see "OK" after the filename:
So you should now have the Slackware ARM installer image file in the /tmp directory on your system. You can check by typing 'ls' at the command prompt. If you carried out the MD5 check you'll already know you have the file. ;-)
If you see something similar to the above (given that there may also be other files of your own already in this directory) you have downloaded the installer image file successfully. So the next thing to do is write the installer image to the microSD card. Remember, in this tutorial our microSD card was /dev/sda (yours might be a different designation) and we're going to use that in the next command. Type the following command, where [device] is the given designation of your microSD card (e.g. /dev/sdb).
Example: xz -dc sarpi3-installer_slackcurrent_10Feb18_sp1.img.xz | dd of=/dev/sda bs=65536
xz may be a package you need to install on your Linux system if you do not already have it. The currently available releases of Slackware Linux comes with xz installed by default. If you need to install the xz package from source, it's available from the XZ Utils website.
It takes a moment for the installer image to be written to your microSD card, after which it will be configured to boot with the Slackware ARM installer. You can check this by typing:
The results from the fdisk command will show you there is a partition on your microSD card. You should see something similar to the following:
If you can see there is a FAT32 *bootable* partition then this is looking very good indeed! Now you can remove the microSD card from your card reader.
If you don't see the partition listed try writing the image to the microSD card again using the xz command shown above. Also try removing the microSD card from your system and plugging it in again. If this process fails continually you may have a faulty or incompatible card. In this case, locate another microSD card.
NB: The /boot partition on a RPi 1,2, or 3 must be FAT32. EXT*, NTFS, FAT16 filesystems won't work!
That's it for configuring your microSD card in Linux.
You can now go on to the next section... Get Slack where you are going to download the Slackware ARM source media.
Configure a microSD card to install Slackware ARM... Windows Users
Using a Windows based system with a microSD card reader installed, or a USB-microSD adapter, it is possible to configure your microSD card to boot the Slackware ARM Installer on your Raspberry Pi. Here's what you need to do:
For all Windows users:
• Download and install 7zip file archiver.
• Download the SARPi installer image relevant to your Raspberry Pi version.
• Extract the SARPi installer image file from the .xz archive to a folder using 7zip file archiver.
• Download and install Win32 Disk Imager tool for writing disk image files to microSD cards.
• Plug a microSD card (16B or greater capacity recommended) into your Windows machine.
• Use Win32 Disk Imager to write the SARPi disk image file you've extracted to the microSD card.
• Check that the /boot files are actually on the microSD card by viewing it in Windows Explorer.
• You should see a FAT32 partition containing the RPi3 boot-firmware, kernel, overlays directory, and initrd.gz ramdisk.
If there are any existing partitions on your microSD card they will be wiped. Make sure you are not using a microSD card which contains important data before overwriting it with the SARPi installer image!
If you can see the FAT32 partition and the files it contains then you know the installer image was written to the microSD card successfully. If you don't see the partition and files then try writing the installer image to the microSD card again. If the problem persists try another microSD card.
Once you have confirmed all the files are there, continue to the next section... Get Slack where you are going to download the Slackware ARM source media.