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:

fdisk

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.)

SARPi Project muse views ... 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:

root@slackware:~# cfdisk /dev/mmcblk0

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

cfdisk

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.

cfdisk

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.

cfdisk

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.

cfdisk

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.

cfdisk

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.

cfdisk

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:

fdisk

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

Back to Top


Updated: 2024-03-08 16:17:08 UTC

Disclaimer: The SARPi Project website is for non-commercial and general information purposes only. The content is provided by Penthux.NET and while we endeavour to keep information up to date and correct, we make no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability or availability with respect to the website or any information, software, products, services, or related graphics which is available on the website for any purpose. Any reliance you place on such information is therefore strictly at your own risk. In no event will Penthux.NET be liable for any loss or damage including without limitation, indirect or consequential loss or damage, or any loss or damage whatsoever arising from loss of data or profits arising out of, or in connection with, the use of this website or any of its contents. Through this website you are able to visit other websites which are not under our control. Penthux.NET has no influence over the nature, content or availability of any external URLs. The inclusion of any URLs does not necessarily imply a recommendation or endorsement of any content therein. Every effort is made to ensure the SARPi Project website remains accessible. However, Penthux.NET takes no responsibility for, and will not be liable for, the SARPi Project website being temporarily unavailable due to technical issues beyond our control. SARPi Project is in no way affiliated with Slackware Linux, Inc, or the Linux Foundation, or Raspberry Pi Ltd., or any of their respective members, trustees, partners, or associates.


Accept!

SARPi Project uses cookies for website traffic data analytics purposes only. Cookies from this website do not collect or store any of your personal data.

Please read the SARPi Project website [ Cookie Policy ] for more details.