SARPi Project - Slacking 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 64GB 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 Linux source media '/dev/sda1' partition. On your own system it may be different (i.e. /dev/sdb1, /dev/sdc1, etc.).
Make a note of the settings, remembering that the results in this guide may not be the same as your own:
• boot partition = /dev/mmcblk0p1
• Slackware Linux 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 guide.
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 device you'll instruct 'cfdisk' to use. So, go ahead and type the command:
On your microSD card you will see a vfat (FAT32) partition already present, as in the example below.
The vfat (FAT32) /boot partition - 'mmcblk0p1' - is fine just as it is. In the example screenshot the size of the /boot partition is 200M in size but this changes periodically. So bear that in mind if yours is not the same. You're going to use this existing /boot partition but you'll also 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 key.
• When asked to specify Partition size make it double the total amount of RAM your Raspberry Pi has and press the key. You can, of course, enter your own size if you prefer.
• Select [ Primary ] and press the 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 intended /swap partition) is the one still highlighted. Then press the key.
You will see the next screen below. You need to move the highlighter to '82 Linux swap' before pressing enter to save/go 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 key.
• When asked to specify Partition size just press the key to use all of the remaining free space.
• Select [ Primary ] and press the 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'. On MBR type disks this used to be a prerequisitie but these days it's not really needed. This is easier done than said by moving the highlight up to 'mmcblk0p1' (the FAT32 /boot partition) and selecting [ Bootable ] at the bottom, and then pressing the key. Incidentally, making this partition 'bootable' is not required to make the Raspberry Pi boot into Slackware Linux, but it's old habits and good practice to do it anyway .
You should have a FAT32 /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 Linux. Just make sure there's more than +18-20GB of free space allocated to your root partition (at the very least) if you're planning for full install. In the example below, you can see our partition table layout and that we've set the Bootable 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 key.
Now, select [ Quit ], or press the 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. Mounting a USB memory stick is not required as the system will detect it automagically, but we're going to go through this process anyway.
If not, continue to the next section of this guide... Run Slackware SETUP
•