Enjoy Slackware 15.0!

Welcome to the Slackware Documentation Project

This is an old revision of the document!


December 2021 - wip - Slackware AArch64 is not yet released !
This document is UNTESTED - it worked, but this author's Pinebook Pro is broken so it's impossible to verify
This has some RockPro64 references within the screenshots - these need updating. However, these are cosmetic only.

Installing Slackware on the Pinebook Pro

Document name inst_sa64_cur_rk3399_pinebookpro
Document purpose Document the installation of Slackware Linux onto the Hardware Model: Pinebook Pro
Version 1.00, Dec 2021
Author Stuart Winter <mozes@slackware>
Contributors Brent Earl

Installation Lifecycle

The Installation consists of a number of stages:

  1. Acquiring all required hardware
  2. Setting up local environment to support the installation over the network
  3. Downloading the Slackware assets
  4. Writing the Initialisation Bootware to the Micro SD card
  5. Setup of the Pinebook Pro hardware
  6. Initialising the Pinebook Pro with the Bootware
  7. Writing the Slackware Installer to the Micro SD card
  8. Booting the Slackware Installer
  9. Installing Slackware
  10. Completing the installation
  11. Booting the Slackware OS

Requirements

Hardware

Item Specification Notes
Pinebook Pro Single specification The Pinebook Pro laptop
Micro SD Card 2GB minimum, fast speed, good quality make Used as Slackware' /boot partition
USB Multi-Card Reader Must accept Micro SD cards Used to write the Bootware on your host Linux computer. This isn't required if your host computer has a Micro SD card reader.
NVME Storage Module Tested: Kingston A2000 SSD = 250G & 500GB Contains the Slackware Operating System
PINEBOOK Pro NVMe SSD Interface Adapter The specific model for the Pinebook Pro Required to house the NVME Storage Module
Serial console adapter 3.5“ audio jack wired version Optional. This is useful for debugging during development, but its use precludes the ability to enable sound on the laptop. Most users will not use the Serial adapter.
PINEBOOK Pro USB-C Docking Deck The specific model for the Pinebook Pro Recommended but optional. The Pinebook Pro has no onboard Ethernet, so this is used during the installer (but the installation media can also be stored on a USB stick). For the Slackware Installer, other USB Ethernet adapters can be used - although this is the only one that has been tested.
Note about the eMMC

From the factory, your PinebookPro contains an eMMC storage module. During the development of Slackware AArch64, it was found that the life span of these storage modules is short which makes them inappropriate for housing an Operating System. Whilst it's possible to use eMMC with Slackware, this documented installation process does not provide a supported path and the eMMC should be removed.

Computing / Network Environment

Item Specification Notes
Host Computer: an Internet-connected computer running an existing Linux distribution Preferably a full installation of Slackware x86/64, but any distribution that can provide the required Python environment and HTTP server module. The Host Computer needs approximately 5GB free storage to download the required software assets. You must be able to obtain root access to this Host computer. This will be used to download the Slackware distribution from the Internet, and serve the Pinebook Pro client to install Slackware over the LAN (Local Area Network).
Network DHCP server Provide an IP address and routing information for the PinebookPro to be able to contact the Linux Host Computer (to download the Slackware tree) and the Internet (to set date via NTP) This document expects the PinebookPro to be able to obtain an IP address via DHCP over the LAN. However, you can also manually configure an IP address once the Slackware Installer has booted (note that a lack of DHCP server will stall the Installer by several seconds). You could also copy the Slackware media to a USB stick and install from there. This is outside of the scope of this document, however this document describes how to set up a simple DHCP service on Slackware.
Most home routers equipped with Ethernet ports provide a DHCP server which should suffice for this setup

Hardware Setup

In this section we'll prepare the physical aspects of the Pinebook Pro to receive Slackware Linux. There are seven distinct parts to this phase:

  1. Unscrew the case
  2. Disable eMMC (and remove storage module)
  3. Enable Sound (disabling Serial console)
  4. Securely attach NVME to NVME adapter
  5. Connect NVME adapter to the main board
  6. Securely attach NVME adapter within the Pinebook Pro's case
  7. Screw case back together

1. Remove the base cover from the Pinebook Pro

Turn the Pinebook Pro over, and remove all screws

Turn the Pinebook Pro back over to reveal the motherboard and interior

Disable booting from eMMC and remove the eMMC storage module

From the factory, the Pinebook Pro will be provided with an eMMC storage module configured to be enabled. During the development of Slackware AArch64, it was found that the life span of these storage modules is short which makes them inappropriate for housing an Operating System. Whilst it's possible to use eMMC with Slackware, this documented installation process does not provide a supported path and the eMMC must be disabled.

Move the eMMC control switch into the down position.

It's recommended to remove the eMMC storage module (as can be seen in the image) as it won't be used for Slackware and may become loose over time. It's also recommended to retain the eMMC with the original Linux distribution should you require it at some point in the future. If you prefer to keep the eMMC storage here, it must be disabled.

To remove it, gently lift it up and out with your fingers.

Ensure Sound is enabled

This control switch dictates the usage of the 3.5” audio jack port. However, if you are debugging or developing, you may wish to use the Serial adapter - in which case, set this switch into the 'up' position.

Since this is a laptop, most people will want to enable sound: ensure that the switch is in the 'down' position (as shown in the image)

Assemble the NVME adapter and storage module

Connect the ribbon cable to the NVME adapter.

Insert the NVME storage module into the adapter interface:

Secure the NVME storage module to the adapter with a nut and bolt (ensure that the nut and bolt do not exceed the height of the storage module, otherwise the case won't close!)

Secure the NVME adapter within the Pinebook Pro's case using the three screws:

Connect the NVME adapter ribbon to the Pinebook Pro's motherboard:

Disconnect the battery bypass cable

The battery bypass cable must be disconnected whilst the battery is attached.

The hardware set up is now complete and should look like this:

Finally, screw the Pinebook Pro's case back together.

The hardware setup is complete.

Software and Network Environment Setup

In this section, we'll prepare the Linux Host Computer to receive and download the Slackware assets required for the installation.

1. Downloading the Slackware Linux AArch64 Distribution and Installation Assets

The '$' prefixes in the commands indicates the shell prompt - it's not to be typed/copied

Open a shell on the Linux Host Computer.

Determine where you are within the Host Computer's Filesystem
$ cd
$ pwd
/home/mozes/slackware
Note the directory location returned - you'll need this later
Prepare a directory to hold and serve the Slackware Distribution

We'll download the Slackware Linux distribution into a directory named 'slackware'.

The contents of this directory will be served via an HTTP server to the LAN (Local Area Network), so only place the Slackware assets here.
$ mkdir slackware
$ cd slackware
Installing the Slackware ARM GPG key

The Slackware ARM GPG key will be used to verify the Bootware and Slackware Installation images.

$ curl -sSL https://www.slackware.com/infra/keys/arm/GPG-KEY | gpg --import -
Set the version of Slackware AArch64 to download

At the time of writing, the only version available is 'current'.

$ SLKVER=current
Set the distribution server

If you are using a mirror server rather than the master Slackware ARM server, set it here. The format is: <hostname>::<rsync module name>

$ SLKSRV=ftp.arm.slackware.com::slackwarearm
Download the Bootware
Note the period/full stop after the rsync commands - this instructs rsync to download to the current directory (it's not punctuation!)

The U-Boot Boot Loader that will be installed onto the SPI flash:

rsync -PavL $SLKSRV/slackwarearm/platform/aarch64/bootware/recovery/rk3399/flash-spi-pinebookpro.img.xz .
rsync -PavL $SLKSRV/slackwarearm/platform/aarch64/bootware/recovery/rk3399/flash-spi-pinebookpro.img.xz.asc .

The Bootware (recovery/initialisation) images are approximately 400KBytes in size.

Download the Slackware Linux installer for the RK3399 AArch64 platform
rsync -PavL $SLKSRV/slackwarearm/platform/aarch64/bootware/installer/slackwareaarch64-${SLKVER}/rk3399_generic.sdimg_latest.img.xz .
rsync -PavL $SLKSRV/slackwarearm/platform/aarch64/bootware/installer/slackwareaarch64-${SLKVER}/rk3399_generic.sdimg_latest.img.xz.asc .

The Slackware Installer images are approximately 300MBytes in size.

Download the Slackware tree verficiation tool
rsync -PavL $SLKSRV/slackwarearm/platform/all/scripts .
Download the Slackware AArch64 tree

You will now download the Slackware distribution. This contains all of the software included within Slackware.

rsync \
   --exclude '*/source/*' \
   --delete -Prlvv \
   $SLKSRV/slackwarearm/slackwareaarch64-${SLKVER} .

The Slackware distribution is approximately 4.5GBytes in size.

Verify the assets

Verify the digital signature of the verification tool:

gpg --verify-files scripts/slacksigchk.sh.asc

The output will be similar to this. You are looking for 'Good signature from Slackware ARM…'

gpg: assuming signed data in 'scripts/slacksigchk.sh'
gpg: Signature made Wed 24 Nov 2021 06:07:44 PM BST
gpg:                using RSA key F7ABB8691623FC33
gpg: Good signature from "Slackware ARM (Slackware ARM Linux Project) <mozes@slackware.com>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 36D3 7609 2F12 9B6B 3D59  A517 F7AB B869 1623 FC33

Verify the Bootware and Slackware tree:

chmod 755 scripts/slacksigchk.sh
./scripts/slacksigchk.sh slackwareaarch64-${SLKVER}
If you see 'BAD signature' you should re-download as it may have become corrupt. If this doesn't help, drop a note to the Slackware ARM forum

Write the Initialisation Bootware to the SD Card

Slackware stores the U-Boot Boot Loader firmware within the SPI flash of the Hardware Models that use the RK3399 SoC (including the Pinebook Pro, RockPro64 et al).

In this step, we'll write the Boot Loader firmware to the same Micro SD card that will later be used to contain the Slackware Installer, and subsequently the Slackware OS' /boot partition. If you have multiple Micro SD cards available, you may prefer to use separate SD cards; but this document assumes the availability of a single Micro SD card.

Elevate yourself to root

On your Host Computer, obtain root:

The # prefix indicates that you're using the root user - it's not to be typed in!
$ su -   ## Note the hyphen - it's required
Check what block devices are present

Prior to inserting the Micro SD Card into the USB adapter, we need to see what's already present within the OS so that we can easily locate our Micro SD card:

# lsblk 
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 465.8G  0 disk
├─sda1   8:1    0     8G  0 part [SWAP]
└─sda2   8:2    0 457.7G  0 part /

As you can see, this Host Computer there is a single storage device - sda.

Now insert the Micro SD card into your USB Card Reader and connect the adapter to a free USB port on the Host Computer.

Run lsblk again:

# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 465.8G  0 disk
├─sda1   8:1    0     8G  0 part [SWAP]
└─sda2   8:2    0 457.7G  0 part /
sdc      8:32   1    58G  0 disk
sdd      8:48   1     0B  0 disk

As you can see, sdc is 58GBytes in size. This is the Micro SD card (in this example, it's labeled as '64GB' on the exterior of Micro SD card).

If your Micro SD card has existing partitions, you will see them surfaced in this list also.

You'll also observe the presence of sdd - often the USB adapter itself obtains a block device. You can ignore this as it's 0Bytes.

Write the Bootware Initialisation Image to the Micro SD Card

Still as the root user, we'll switch to the directory to which the the Slackware assets have been downloaded (see earlier steps):

# cd /home/mozes/slackware/

Write the Bootware Initialisation Image to the device identified as our Micro SD card. You'll then exit the root shell, returning to your usual standard user environment:

All data on this Micro SD Card will be erased! Ensure you have inserted the correct card!
# dd if=/dev/zero of=/dev/sdc count=2 bs=1M    ## Replace /dev/sdc with the correct block device (presented above by the lsblk tool) on your Host Computer
# xzcat flash-spi-pinebookpro.img.xz > /dev/sdc  ## Replace /dev/sdc with the correct block device (presented above by the lsblk tool) on your Host Computer
# sync
# exit

Installing the Boot Loader to SPI flash

You need to perform this one-time step to flash a Slackware version of the U-Boot Boot Loader to the SPI flash of the Pinebook Pro.

If you reinstall Slackware you do not need to repeat this step, as long as the Slackware version of U-Boot remains within the SPI flash.
  1. Connect the power to the Pinebook Pro
  2. Disconnect any peripherals (including the Pinebook Pro docking station) from the Pinebook Pro.
  3. Insert the Micro SD card into the Pinebook Pro's Micro SD slot (right hand side, below the 3.5“ audio jack port)
  4. Open the lid
  5. Power on the Pinebook Pro: hold down the Power button (top right of keyboard) for 3 seconds

After a few seconds, you should see a message appearing on the screen - instructing you that the process will begin in 10 seconds' time, and to release the SPI jumper. In most cases you can simply wait until the process begins.

Once the process completes, hold the power button for approximately 8 seconds. The PinebookPro will power off.

Any issues with installing to SPI flash

Even if there's an existing distribution that has installed a Boot Loader to the SPI flash, the Slackware Micro SD card Recovery/Initialisation image should boot and work as described above.

However, if not there is a 'Recovery' button on the Pinebook Pro's main board (requires dissassembling) that will 'mask out' the SPI flash to prevent any Boot Loader stored on the SPI flash from being loaded and executed.

The process of masking out the SPI flash is as follows (taken from here):

  1. Insert the Slackware Recovery/Initialisation Micro SD card into the Pinebook Pro's Micro SD slot
  2. Press and hold 'recovery' button.
  3. Quickly press 'reset' button.
  4. Release 'recovery' button after about 3 seconds

If this doesn't work, you may need to try a few times. There are other methods also outlined on the Pine64 wiki.

Write the Slackware Installer image onto the MicroSD card

Now that the Boot Loader has been installed to the PinebookPro's SPI flash, we will install the Slackware Installer image onto the same MicroSD card.

  • Remove the MicroSD card from the PinebookPro
  • Insert the MicroSD card back into the Host Computer (as in the earlier section)
Elevate yourself to root

On your Host Computer, obtain root:

The # prefix indicates that you're using the root user
$ su -   ## Note the hyphen - it's required
Write the Slackware Installer to the Micro SD card

Follow the instructions in the previous section to determine which block device name it occupies.

Typically the block device will remain the same (in this tutorial it's /dev/sdc) but you should verify each time using lsblk.
The # prefix indicates that you're using the root user - it's not to be typed in!

Enter the directory into which the Slackware assets were downloaded previously:

# cd /home/mozes/slackware
# xzcat rk3399_generic.sdimg_latest.img.xz > /dev/sdc ## Replace /dev/sdc with the correct block device
# sync
# exit
Remove the MicroSD card from the Host Computer

You may now disconnect the USB adapter from the Host Computer and remove the MicroSD card.

Start the installation media server

We will direct the Slackware Installer to download the packages from a web server that we'll run temporarily on your Linux Host Computer.

Determine the Linux Host Computer's IP address

For most basic installations, the following command will provide the correct IP. If your Linux Host Computer has a more complex setup, you'll need to determine the IP address yourself using ifconfig or one of the other tools.

$ hostname -I
192.168.1.1

In this example, the IP address of the Linux Host Computer is 192.168.1.1

Start the HTTP server on the Linux Host Computer

As your normal (not root) user on your Linux Host Computer, we'll enter the Slackware AArch64 directory and start the HTTP web server:

$ cd ~/slackware/slackwareaarch64-*/  
$ python3 -m http.server
The HTTP server will remain in the foreground - you may now leave it. We will return to close it post installation.

Installing Slackware

To proceed, you must have:

  • Assembled the PinebookPro as documented above
  • Connected the Docking station
  • Connected the Ethernet cable, and have a DHCP server serving the network from which the PinebookPro can obtain an IP address
  • Inserted the Micro SD card containing the Slackware Installer into the PinebookPro's MicroSD card slot
Begin installation
Disconnect any USB storage devices that aren't required for the OS installation
Power on the PinebookPro

Press the Power Button for aproximately two seconds

After a few seconds, the you will see the following on screen:

It takes several seconds to load and boot the installer, and it may take several seconds more for any further output to appear on the screen. The process of obtaining an IP address via DHCP can also delay the ability to interact with the Installer.

Once an IP address has been obtained, you will be presented with a prompt. Press ENTER

Set the keymap

Set the date/time

Sync the date from a highly-available NTP server:

ntpdate clock.akamai.com
hwclock -w

Setup disk partitions

For this installation a basic partitioning scheme will be created.

Partition

Partition number Device name Size Purpose
1 /dev/nvme0n1p1 4GB Swap
2 /dev/nvme0n2p2 Rest of storage OS root ('/') partition
/boot will reside on the Micro SD card and is automatically configured by the Slackware Installer

Open fdisk against the /dev/nvme0n1 block device (which will be your primary storage, and in these instructions is the NVME you screwed inside the laptop in the previous section).

fdisk /dev/nvme0n1

Create the Swap partition:

Type 'n' for new partition:

Type 'p' for primary partition type:

Press ENTER for the 'First sector'

Type '+4G' for the 'Last Sector'/size:

Change the partition type to 'Swap'. Type 't' then hex code '82':

Create the partition for the root filesystem ('/'):

Type 'n' for new partition. Press ENTER to accept the defaults - this will create partition 2 as the maximum size available.

Type 'a' to mark the root partition (number 2) as bootable Type '2' to select partition 2.

Type 'p' to print to view the partition table.

Type 'w' to write the partition table:

fdisk will now exit.

Load the Setup menu

Setup Swap partition

Select and format the partition for the OS' root file system

Resize /boot partition to full extent

The Micro SD card that contains the /boot partition presently occupies approximately 1GB. Most MicroSD cards are several GBs in size. This option will resize the partition to its full capacity to avoid wasting storage. If you plan on manually adding parttions to this later, you will want to choose 'No' here.

It's important that the Micro SD card is not used for heavy read/writes as it'll damage it and will cause your system not to boot. This option exists simply to avoid wasting space on the MicroSD card.

Boot Loader Configuration

The Installer will configure the Boot Loader and the OS' /etc/fstab automatically:

Note: the screenshot shows /dev/sda2. This is from the RockPro64 and needs replacing - it will be the NVME block device name.

Select Source Media

The IP address here is the one you determine earlier within these instructions. The port should always be 8000

Pick option '5 - Install from FTP/HTTP server'

URL: http://192.168.1.1:8000
Directory: /

Package Series Selection

You can now choose the package sets to install. The recommendation is to install everything. A full Slackware installation will occupy approximately 15GB.

If you do not plan to use the graphical window manager such as KDE, you should de-select it.

Pick the 'terse' option:

The packages will begin installing:

Configure the Console Settings

If you plan on using the UART/'Serial' console, you should select 'No' here. If you plan on exclusively using an HDMI monitor, you should pick 'Yes'.

This setting can be reset to the default by editing /boot/extlinux/extlinux.conf and removing the 'console=' setting once the OS has booted

Install the Boot Loader to SPI flash

If this is the first time you have installed Slackware, you must flash the Boot Loader. The initial Boot Loader flash performed earlier in these instructions typically contains an older version of the Boot Loader, where as the version packaged within the Installer contains the latest tested version.

Remove the Slackware Installer from the SD card

The Micro SD card is transformed from being the Slackware Installer into the Slackware OS's /boot partition. At this stage, if the installation has worked for you (at certain points in the Slackware installer you are past the point of no return) you can delete the Installer. However, if something has gone wrong you can reset the PinebookPro and reboot the installer without having to re-deploy the Slackware Installer image from your Linux Host Computer.

Generally you should say 'Yes' here.

Post Installation Configuration

The Slackware Installer will walk you through the standard Slackware setup. The on-screen instructions will suffice.

Select a Console Font

It's recommended for the RockPro64 and Pinebook Pro that a larger console font is configured.

The recommended font is 'ter-732b.psf'. This is the font used within the Installer.

Continue Post Installation Configuration

Configure GUI Window Manager

This author recommends using XFCE as it's light weight versus KDE.

Continue Post Installation Configuration

Slackware Setup Complete

Generally you'll want to reboot into the OS.

However, if you are planning on setting up RAID or need to customise the Operating System Initial RAM Disk, you should select 'Shell'.

The Slackware OS will be found within '/mnt'. You can use the 'os-initrd-mgr' tool (Video tutorial).

Booting the Slackware OS

Login to the Slackware OS

You may now login as 'root', using the password you set within the installer.

Quit the HTTP media server

On your Linux Host Computer, you can return to the HTTP server that we started earlier on. In the terminal window in which you started it, you will see the access logs from the Slackware Installer downloading the packages.

Simple press CONTROL+c to quit it.

You may now delete the slackwareaarch64 tree, or perhaps keep it around to subsequently update it.

Post Installation Configuration

There are a few post-installation configuration tasks to complete.

Add a plebeian user

You should add a plebeian (non-root) user using the 'adduser' tool.

This is documented here.

LCD brightness

The Slackware Installer automatically configures the maximum brightness, but this doesn't carry over to the OS.

You may want to add this to /etc/rc.d/rc.local:

echo 4000 > /sys/class/backlight/edp-backlight/brightness

This may be included within the OS as standard at some point.

Known bugs

Using the Serial/UART adapter

This documentation discusses using the RockPro64 without the UART/Serial console.

If you'd like to use one, you'll need to adjust the switch that toggles Sound vs UART, and connect the adapter (details in the Hardware requirements section above).

You can then connect the USB end of the adapter into your Linux Host Computer, and use the following command. This assumes that there are no other similar adapters occupying /dev/ttyUSB0. If so, you will need to adjust the device name accordingly (e.g. perhaps /dev/ttyUSB1).

screen -T screen-256color /dev/ttyUSB0 115200

In Other Languages
Translations of this page?:
QR Code
QR Code slackwarearm:inst_sa64_cur_rk3399_pinebookpro (generated for current page)