Slackware ARM on a Raspberry Pi

Information on available drives

You're going to need some information about your Linux system, and the available drives, in order to make new partitions. The easiest way to get the information you need is with the 'fdisk -l' command, like this:

The top device '/dev/mmcblk0' is our 32Gb microSD card. Notice that '/dev/mmcblk0p1' is the FAT32 partition where our boot files are located. The bottom device, '/dev/sda', is the 16Gb USB memory stick containing our Slackware ARM source media '/dev/sda1' partition. On your own system it may be different (i.e. /dev/sdb1).

Make a note of these settings:
• boot partition = /dev/mmcblk0p1
• Slackware ARM source = /dev/sda1 (or /dev/sdb1, etc.)

If you're not using a USB stick as your Slackware SOURCE then you can ignore the instructions relating to it when following this tutorial.

The cfdisk partition manager

Now you need to setup the required partitions on your microSD card. You will do this using 'cfdisk' which is a command line partition manager in Linux. Remember your microSD card is '/dev/mmcblk0' and this is the drive we tell cfdisk to use. So, go ahead and type the command:

root@slackware:~# cfdisk /dev/mmcblk0

On your microSD card you will see a vfat (FAT32) partition already present, as in the example below.

The vfat (FAT32) partition 'mmcblk0p1' is fine as it is. In the example screenshot the size of the vfat partition is 91.6MB but this size changes from time to time so bear that in mind if yours is different. You're going to use the existing vfat partition as your boot partition but you're also going to need additional partitions in order to house your Linux system. So, at this point you should create a swap partition and a root partition.

Create a swap partition like this:

• Move the highlight down to the Free Space, using the cursor keys on your keyboard.
• select [ New ] at the bottom, and then press the enter key.
• When asked to specify Partition size type 512M and press the enter key. You can enter your own size if you prefer; 256M, 128M
• Select [ Primary ] and press the enter key.

Your new partition has been created. Now you need to tell cfdisk that this partition is going to be used as a swap file. At the bottom of the screen move the highlight to [ Type ] and make sure that 'mmcblk0p2' (the 512M partition) is the one still highlighted. Then press the enter key.

You will see the next screen below. You need to move the highlighter to '82 Linux swap' before pressing enter to save/close back to the cfdisk partition management screen.

This should have set the Partition Type to 'Linux swap' and if you can see that then all is good.

Now you need to create the root partition and we do it in much the same way as before:

• Move the highlight down to the Free Space
• select [ New ] at the bottom, and then press the enter key.
• When asked to specify Partition size just press the enter key to use all of the remaining free space.
• Select [ Primary ] and press the enter key.

So, if your screen is similar to the one above (given that you may have used a different size microSD card) then it's looking very good. The last thing you can do is set the boot partiton as 'bootable'. This is easier done than said by moving the highlight up to 'mmcblk0p1' (the vfat partition) and selecting [ Bootable ] at the bottom, and then pressing the enter key. Incidentally, making this partition 'bootable' is not required to make the Raspberry Pi boot into Slackware, but it's good practice to do it anyway.

You should have a vfat boot partition, a swap partition (of the size you've selected), and the rest of the space on your microSD card for your root partition. On our system we have quite a large root partition and this is more than adequate space on which to install Slackware ARM. Just make sure there's more than 10Gb allocated to your root partition if you're planning for full install. In the example below, you can see our partition table layout and that we've set the Boot flag on our 'mmcblk0p1' boot partition. So now you need to save these settings.

Save the new partition table to disk settings by selecting [ Write ] at the bottom and typing the word 'yes' when asked to save the changes, then pressing the enter key.

Now, select [ Quit ] (or press 'Q' key) to exit the cfdisk partition manager.

At the command prompt type 'fdisk -l' and you should now see something similar to the following output:

You should have /boot (/dev/mmcblk0p1), /swap (/dev/mmcblk0p2), and /root (/dev/mmcblk0p3) partitions set-up on your microSD card. If not, go back and run the 'cfdisk /dev/mmcblk0' command again.

Once this has been done you now have the option to Mount your USB memory stick if you are using it for your Slackware source.

If not, continue to the next section of this tutorial... Run Slackware SETUP

Updated: 01 Aug 2018 23:41:37