[[https://arm.slackware.com/|Slackware ARM project web site]] | [[https://www.linuxquestions.org/questions/slackware-arm-108/|Forum]] | [[slackwarearm:development|Slackware ARM development documentation]] | [[slackwarearm:inst|Slackware ARM installation guides]] ====== Installing Slackware on the Raspberry Pi 4 ====== ^ ^ ^ | Platform | AArch64/ARM64 | | Hardware Model |Raspberry Pi 4 | | Document Version | 1.06, Mar 2024 | | Author | Stuart Winter | | Contributors | Brenton Earl (R&D for the RPi4 Hardware Model) | At the moment, only the Raspberry Pi 4 is officially supported. Please refrain from attempting to use this on other versions with the expectation that it will function correctly. ==== Video Tutorial ==== This tutorial is also available in [[https://www.youtube.com/watch?v=J1fFfBHuRh8|video form]]. The video tutorial demonstrates the original installation approach where the Slackware installation media was separate. A single Slackware Installer image is provided that contains all of the media, so it's easier than shown in the video. ==== Help / Support ==== Please post questions to the [[https://www.linuxquestions.org/questions/slackware-arm-108/|Slackware ARM forum]]. ==== Caveats ==== == Fragility due to upstream support == The support within the proper [[https://kernel.org|Linux Kernel]] is fragile due to the development model of the Raspberry Pi company. You may need to switch to the RPi Kernel fork for the best experience. Instructions on how to do this are included in the post installation section of this document. ==== Installation Lifecycle ==== The Installation consists of a number of distinct stages: - Acquiring all required hardware - Setup of the Raspberry Pi hardware - Downloading and Verifying the Slackware assets - Writing the Slackware Installer to the Micro SD card - Booting the Slackware Installer - Installing Slackware - Completing the installation - Booting the Slackware OS - Post installation configuration and tweaks ===== Requirements ===== === Hardware === This hardware list is what has been recommended by the Slackware community as a good starting point for setting up a Raspberry Pi. There are a plethora of peripherals available for the Raspberry Pi which you can use with Slackware. SD cards: Some SD cards are known to have issues on the Raspberry Pi4. Please use one of the brands provided in the hardware table below. Please purchase the hardware from any vendor: Slackware ARM has no affiliation with The PiHut, but it is a useful one-stop-shop for RPis and accessories, and this author can attest to good service within the UK. ^ Item ^ Specification/Type ^ Required? ^ Notes ^ |[[https://thepihut.com/collections/raspberry-pi/products/raspberry-pi-4-model-b?variant=31994565689406|Raspberry Pi 4 Model B]] | 4GB and 8GB RAM models have been tested | Yes | This is the bare board | |[[https://thepihut.com/products/ice-tower-raspberry-pi-4-cpu-cooler|'Ice Tower' CPU heat sink & cooling fan]] | | A heat sink or CPU is required | This has been recommended as a suitable fan for high-CPU workloads. | |[[https://thepihut.com/collections/raspberry-pi-psus/products/raspberry-pi-psu-uk|Power supply]] | Official Raspberry Pi PSU | Yes | It's best to use the official PSU as others can cause instability over time. | |[[https://thepihut.com/products/usb-c-cable-with-switch|Inline power switch]] | - | Optional but recommended | The Raspberry Pi 4 does not have reset nor power buttons on the board. Reports from the Slackware community suggest that the power socket on the Rpi will become damaged over time from wear. This inline power switch prevents damage to the RPi. | |[[https://thepihut.com/products/hdmi-to-micro-hdmi-adapter-cable-160mm|Micro to full-size HDMI adapter]]| - | Optional | Depends on your local setup and whether you wish to connect an HDMI monitor to the RPi.| |[[https://thepihut.com/products/adafruit-pirtc-precise-ds3231-real-time-clock-for-raspberry-pi-ada4282|Real Time Clock (RTC)]] | Adafruit PiRTC - Precise DS3231 |Optional| This RTC been recommended by the Slackware community. | |[[https://thepihut.com/products/cr1220-12mm-diameter-3v-lithium-coin-cell-battery|Battery for RTC]] |Lithium 3volt CR1220 | Optional | Depends on whether you use the RTC module. This enables the RTC to maintain the time whilst the RPi is powered down. | |[[https://thepihut.com/products/thepihuts-jumper-bumper-pack-120pcs-dupont-wire|Dupont wires]] | Female to male | Optional | This is to wire in the RTC module, as the large sized CPU heat sink prevents the RTC module from connecting directly to the GPIO. These wires are also useful for connecting other peripherals to the RPi's GPIO. | | [[https://www.amazon.co.uk/Kingston-SA400S37-240G-Solid-State/dp/B01N5IB20Q|SATA storage / SSD]] | Minimum useful size: 30GB | Required | Will contain the Operating System. You can install to other storage, but this documentation covers this particular configuration only. The Kingston-SA400S37-240G has thoroughly proved itself in the Slackware ARM build infrastructure - most build machines use these, but any SSD or spinning hard disk should work | | [[https://www.amazon.co.uk/gp/product/B06WWLCYC3|USB to SATA adapter]] | - | Required | Many models will work, but this one has been tested on many of this author's ARM hardware. | | | [[https://thepihut.com/products/usb-to-ttl-serial-cable|USB to Serial adapter]] | PL2303 chip. Other models may work, but this one has been tested. If your model has the option to set voltages, ensure **3volts** is set! | Optional | A USB to Serial/UART adapter is recommended if you want to access the console remotely, but is unnecessary if you only plan on using an HDMI monitor. This document covers installing using an HDMI monitor - you can find information about connecting the Serial/UART adapter at the foot of this document| | [[https://www.amazon.co.uk/SanDisk-microSDHC-Adapter-Performance-SDSQUA4-032G-GN6MA/dp/B08GY9NYRM/|Micro SD Card]] | 16GB **minimum capacity**, Class 10 (fast speed) | Required | Initially used to boot the Slackware Installer, and subsequently transformed into Slackware's /boot partition. | | USB keyboard and mouse | Standard peripherals | Required | A USB keyboard and mouse are required for this Slackware installation guide but are not required for the running of the OS. Slackware can also be installed headless (without a keyboard or monitor) over the Serial/UART or SSH (but this isn't documented). | == Recommended/ tested SD cards and other storage peripherals == In addition to the examples of tested hardware, here follows other storage devices and peripherals that have been tested by the Slackware community. ^ Type ^ Details ^ | Micro SD card | [[https://www.amazon.com/gp/product/B07N73LB4T/ref=ppx_yo_dt_b_asin_title_o05_s00?ie=UTF8&psc=1|Gigastone 32GB]] | | Micro SD card | [[https://www.amazon.com/gp/product/B07Z4GQHD6/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&psc=1|Kingston 64GB microSDHC Canvas Select Plus]] | | Micro SD card | [[https://www.kingston.com/unitedkingdom/en/memory-cards/canvas-go-plus-microsd-card|Kingston SDCG3]] | | Micro SD card | [[https://www.amazon.com/gp/product/B089DPCJS1/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1|SanDisk 16GB]] | | USB to SATA adapter (alternative to the one in the table above) | [[https://www.amazon.com/gp/product/B07S9CKV7X/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&psc=1|SKL Tech]] | == Alternatives to SSD == If you prefer to use NVME storage, these have been tested: | NVME Storage Module | [[https://www.amazon.co.uk/Kingston-A2000-SA2000M8-500G-NVMe/dp/B07VXCFNVS|Kingston A2000 SSD 250G & 500GB models]] | | USB to NVME M.2 adapter & enclosure | [[https://www.amazon.co.uk/LEMORELE-Enclosure-Thunderbolt-Compatible-Tool-Free/dp/B08TWWQ9ZS|LEMORELE M.2 NVMe SSD Enclosure USB C External PCIe B+M/M-Key SSD Caddy 10Gbp UASP USB 3.1 Gen 2 M2]] | === Notes on storage setup === The setup documented here (2.5" SSD connected to a USB-to-Serial adapter for power and data) has proven stable for this author. It is possible to create a 4th partition on the Micro SD card ('MMC') which can house the Slackware OS. However, this is not recommended due to the longevity of this type of storage - particularly if it has high I/O. If you want to install the OS to the MMC card, it's preferable to use the [[https://slackware.uk/slackwarearm/platform/aarch64/bootware/installer/|''bare'' Slackware Installer image]] rather than the standard 'AiO' (All in One) Installer (which is what this Installation guide covers). Using the ''bare'' Installer means you will need to install over the network or from some locally attached storage. === Computing / Network Environment === ^ Item ^ Specification ^ Notes ^ | Host Computer: an Internet-connected computer running an existing Linux distribution | 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 to write the Slackware Installation media to the Micro SD card. | ===== Hardware Setup ===== In this section we'll prepare the physical aspects of the Raspberry Pi4 to receive Slackware Linux. Note that this is just one of a vast array of hardware configurations for the Raspberry Pi4. If you have a different configuration that's already working, you can skip to the 'Software and Network Environment Setup ' section == Attach the base board == Attach the base board to the RPi4 using the brass spacers. Ensure that each brass spacer is screwed into the base board, as shown. {{:slackwarearm:001-asmrpi4-baseboardassembled.jpg?400|}} The base board comes with the 'Ice Tower' CPU cooling pack (as mentioned within the Hardware Requirements table). Other RPi "open" case designs would connect the RPi in a similar manner (e.g., the bottom element of Micro Connectors' Acrylic Stackable Raspberry Pi case) == Screw four spacers to the top to secure the board to the platform == {{:slackwarearm:002-asmrpi4-baseboardassembled-sideview-annotated.jpg?400|}} == Attach the thermal tape to the CPU == Lay one of the pieces of thermal tape atop the CPU as shown: {{:slackwarearm:003-asmrpiu4-attachcputhermaltape.jpg?400|}} == Attach the heat sink brackets == {{:slackwarearm:004-asmrpi4-attachbracketstoheatsink.jpg?400|}} Pay close attention to the positioning of the brackets, otherwise it won't sit on the board properly. Use the symbols on the brackets for orientation == Secure the board to the platform == {{:slackwarearm:005-asmrpi4-attachheatsink-to-board-3nuts.jpg?400|}} Only apply 3 nuts as shown. The fourth brass-coloured 'spacer' will be used to seat the RTC (Real Time Clock). If you do not have an RTC, secure this with a fourth nut. == Attach CPU fan power wires == {{:slackwarearm:006-asmrpi4-attachfanpower-to-gpio-annotated.jpg?400|}} == RTC (Real Time Clock): Insert battery == {{:slackwarearm:007-asmrpi4-insertrtcbattery.jpg?400|}} == RTC (Real Time Clock): Wiring == {{:slackwarearm:007-asmrpi4-insertdupontwiresintortc.jpg?400|}} {{:slackwarearm:008-asmrpi4-annotateddupontwiresf.jpgorrtc-svd-annotated.jpg?400|}} {{:slackwarearm:009-asmrpi4-wirertctogpiopins-annotated.jpg?400|}} == RTC (Real Time Clock): Attach to Raspberry Pi == {{:slackwarearm:010-asmrpi4-addspacer-for-rtc-platform.jpg?400|}} {{:slackwarearm:011-asmrpi4-screwrtctospacer-annotated.jpg?400|}} == Add all other peripherals required to install Slackware == * Connect the storage - ensure that it's connected to a **blue USB 3.0** port * Connect the Ethernet cable (optional - required if you want to set the date via NTP before commencing installation) * Connect the HDMI cable * Connect the USB keyboard and mouse {{:slackwarearm:012-asmpi4-allperipherals-connected-annotated.jpg?400|}} {{:slackwarearm:013-asmrpi4-allperipherals-connected-edgeview_-annotated.jpg?400|}} The basic hardware setup is complete. ===== Downloading the Slackware assets ===== 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. == Prepare a directory to hold and serve the Slackware Distribution == We'll download the Slackware Linux distribution into a directory named 'slackware'. $ cd ## this returns to the root of your home directory $ mkdir slackware $ cd slackware == Determine where you are within the Host Computer's Filesystem == $ pwd /home/mozes/slackware Note the directory location returned - you'll need this later == Installing the Slackware ARM GPG key == The Slackware ARM GPG key will be used to verify your downloads. $ curl -sSL https://www.slackware.com/infra/keys/arm/GPG-KEY | gpg --import - == Set the model of Raspberry Pi == The Raspberry Pi Slackware Installer images are identical, so if you have both the RPi3 & 4 you should only download one image. If this changes, this message will be removed. For the Raspberry Pi 3: $ HWM=bcm2837_rpi3 For the Raspberry Pi 4: $ HWM=bcm2711_rpi4 == Set the version of Slackware AArch64 to download == At the time of writing, the only version available is 'current'. $ SLKVER=current == Set the Internet media distribution server == If you are using a mirror server rather than the master Slackware ARM server, set it here. The format is: :: $ SLKSRV=ftp.arm.slackware.com::slackwarearm == Download the Slackware Linux Installer == $ rsync -PavL $SLKSRV/platform/aarch64/bootware/installer-aio/slackwareaarch64-${SLKVER}/${HWM}.img.xz.asc slkaio.img.xz.asc $ rsync -PavL $SLKSRV/platform/aarch64/bootware/installer-aio/slackwareaarch64-${SLKVER}/${HWM}.img.xz slkaio.img.xz //The Slackware Installer images are approximately 5 GBytes in size.// == Verify the Slackware Installer image == Verify the digital signature of the Slackware Installer: $ gpg --verify slkaio.img.xz.asc As the images are large, verification may take a minute or two. The output will be similar to this. You are looking for 'Good signature from Slackware ARM...' gpg: assuming signed data in `slkaio.img.xz' 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) " [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 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 [[https://www.linuxquestions.org/questions/slackware-arm-108/|Slackware ARM forum]] ===== Writing the Slackware assets to the Micro SD ===== === 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 === Write the Slackware Installer to the Micro SD card === == 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 -d NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 465.8G 0 disk As you can see, this Host Computer there is a single storage device - //sda//. == 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 -d NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 465.8G 0 disk sdc 8:32 1 58G 0 disk sdd 8:48 1 0B 0 disk As you can see, //sdc// is 58 GBytes 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 not see them surfaced in this list - use //lsblk -b// to view them. 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 Slackware Installer to the Micro SD card === Enter the directory into which the Slackware assets were downloaded previously: # cd ~mozes/slackware ## Substitute with the path you noted earlier # xzcat slkaio.img.xz | dd status=progress bs=4M iflag=fullblock of=/dev/XXX ## Substitute/dev/XXX with the correct block device # sync == Remove the MicroSD card from the Host Computer == You may now disconnect the USB adapter/remove the Micro SD card from the Host Computer. == Logout from the root user == We no longer need to use the Host Computer, so you can logout of the root shell. # logout ===== Installing Slackware ===== To proceed, you must have: * Connected the storage to the Raspberry Pi 4 * Connected the HDMI monitor * Connected the keyboard (and optionally, mouse) * Optionally connected the Ethernet cable to set the date via NTP from the Internet * Inserted the Micro SD card containing the Slackware Installer == Encrypted storage == If you'd like to encrypt your storage, check the [[slackwarearm:disk_encryption_slackware_aarch64|Disk Encryption Guide]]. === Begin installation === Disconnect any USB storage devices that aren't required for the OS installation Due to bugs in the upstream Linux Kernel, the screen may blank every few seconds. This is normal and can be resolved by switching to the Raspberry PI Kernel fork (detailed later in this guide). == Power on the Raspberry Pi 4 == Apply power to the Raspberry Pi and after a few seconds, you will see the following on screen: {{:slackwarearm:00-u-boot-bootinginstaller.jpg?400|}} 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 HDMI monitor. 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** {{:slackwarearm:01-activatevirtualconsole.jpg?400|}} == Set the keymap == {{:slackwarearm:02-setkeymap_a.jpg?400|}} {{:slackwarearm:03-_setkeymap_b.jpg?400|}} {{:slackwarearm:04-setkeymap_c.jpg?400|}} == Font size == If you're using a smaller monitor, such as one with a screen size less than 20 inches, it may be necessary to adjust the console font size to ensure that menus and other interface elements fit correctly on the screen. If so, type this into the shell prompt: setfont ter-v18n == Set the date/time == Even if you have a battery pack for the RTC (Real Time Clock), the date on your system may be incorrect. We will sync the date from a highly-available NTP server: ntpdate clock.akamai.com hwclock -w {{:slackwarearm:06-ntpdate.jpg?400|}} == Setup disk partitions == For this installation a basic partitioning scheme will be created. Partition ^ Partition number ^ Device name ^ Size ^ Purpose ^ | 1 | /dev/sda1 | 4GB | Swap | | 2 | /dev/sda2 | 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/sda block device. In this guide, /dev/sda will be your primary storage, and in this guide is the SSD connected to the USB adapter. fdisk /dev/sda {{:slackwarearm:07_-_fdisk-rpro64.jpg?400|}} Clear an existing partition table: Press 'o' to clear the partition table {{:slackwarearm:07_-fdisk-clear-partitions.jpg?400|}} Create the Swap partition: Type 'n' for new partition: {{:slackwarearm:08_-_fdisk-rpro64.jpg?400|}} 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': {{:slackwarearm:09_-_fdisk-rpro64.jpg?400|}} 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. {{:slackwarearm:10 - fdisk-rpro64.jpg?400|}} Type 'a' to mark the root partition (number 2) as bootable Type '2' to select partition 2. {{:slackwarearm:11 - fdisk-rpro64.jpg?400|}} Type 'p' to print to view the partition table. {{:slackwarearm:12- fdisk-rpro64.jpg?400|}} Type 'w' to write the partition table: {{:slackwarearm:13 - fdisk-rpro64.jpg?400|}} fdisk will now exit. == Load the Setup menu == {{:slackwarearm:14-startSlackSetup.jpg?400|}} == Setup Swap partition == {{:slackwarearm:15-SlackSetup-screen.jpg?400|}} {{:slackwarearm:16-SwapSpaceDetected-rpro64.jpg?400|}} {{:slackwarearm:17-SwapSpace-DefectCheck-rpro64.jpg?400|}} {{:slackwarearm:18-SwapSpace-configured-rpro64.jpg?400|}} == Select and format the partition for the OS' root file system == {{:slackwarearm:19-SelectRootPartition-rpro64.jpg?400|}} {{:slackwarearm:20-QuickFormatRootPartition.jpg?400|}} {{:slackwarearm:21-SelectFSforRootPartition.jpg?400|}} {{:slackwarearm:22-FormattingRootPartition-inProgress-rpro64.jpg?400|}} == Boot Loader Configuration == The Installer will configure the Boot Loader and the OS' /etc/fstab automatically: {{:slackwarearm:26-updatingubootconfig-rpi.jpg?400|}} {{:slackwarearm:27-addedlinuxpartitions-rpi.jpg?400|}} On the ARM platform, the Swap and root file systems are addressed by labels (//see above: 'LABEL='//) where as on x86/64 it's addressed by a direct reference to the block device (e.g. /dev/sda). The Slackware Installer will label swap partitions as //'SLKswap'//, and the root file system //'SLKroot'//. Other labels in use are //'SLKboot'// for the OS boot partition (/boot), and //'SLKhwm_bw'// for the Hardware Model Bootware partition (/boot/platform/hwm_bw). These labels are pre-labeled on the SD card image that you deployed and won't be presented during the installation process. The rationale behind this divergence is that on x86 the root file system is typically on a storage bus (SCSI, SATA, ATA), where the physical configuration (which port the storage is connected to) of the storage rarely changes. This can be the case on ARM, but it's generally to a lesser extent and the root file system may be connected to a hot-plug bus such as USB. This lends itself to the risk of device re-ordering across boot cycles (e.g. /dev/sda becomes /dev/sdb), causing boot failure. Please be aware that the Slackware Installer //only// labels the swap and root file system. Therefore you are advised to manually label the file systems and modify the OS /etc/fstab accordingly. If you have only a single storage device and don't plan on adding more, you can use the settings that the Slackware Installer configures. == Select Source Media == {{:slackwarearm:28-source-aio.png?400|}} Press ENTER to say 'Yes'. If you would like to install from an alternate media source, pick 'No' and you will be presented with options to install over NFS, USB and HTTP amongst others. Ordinarily you should always say 'Yes' unless you've been directed to do otherwise. == 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. {{:slackwarearm:33-PackageSeriesSelection.jpg?400|}} Pick the 'terse' option: {{:slackwarearm:34-SelectingInstallMode.jpg?400|}} The packages will begin installing: {{:slackwarearm:35-PackagesInstalling.jpg?400|}} == 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. {{:slackwarearm:36-consolebootsettings-rpi.jpg?400|}} == 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 Raspberry Pi and reboot the installer without having to re-deploy the Slackware Installer image from your Linux Host Computer. Generally you should say 'Yes' here. {{:slackwarearm:40-RemoveSlackInstaller-from-sdcard.jpg?400|}} You may be tempted to retain the Slackware Installer, but note that the Installer contains Linux Kernel modules for the Kernel that the Installer was originally shipped with. This means that as soon as you upgrade the Slackware Kernel package, the Installer will fail to boot. The option to retain the Installer is present purely because on a number of occasions, this author only realised that the installation was incorrectly performed upon completion, and needed to reinstall. Retaining the Installer avoids the requirement to re-deploy the image to the SD card. == Post Installation Configuration == The Slackware Installer will walk you through the standard Slackware setup. The on-screen instructions will suffice. {{:slackwarearm:41-LoadGPMatboot.jpg?400|}} {{:slackwarearm:42-ConfigureNetwork.jpg?400|}} {{:slackwarearm:42-configurenetwork-enterhostname-rpi.jpg?400|}} {{:slackwarearm:42-configurenetwork-enterdomainname-rpi.jpg?400|}} {{:slackwarearm:43-ConfigureNetwork-ConnectViaVLAN.jpg?400|}} {{:slackwarearm:44-NetworkIPManagement-NetworkManager.jpg?400|}} {{:slackwarearm:45-ConfigureNetwork-Complete.jpg?400|}} {{:slackwarearm:46-ConfirmServicesToRun.jpg?400|}} == Select a Console Font == It's recommended for the Raspberry Pi that a larger console font is configured for the virtual console. {{:slackwarearm:47-ConsoleFontConfig-Yes.jpg?400|}} {{:slackwarearm:48-ConsoleFontConfig-FontChoice.jpg?400|}} The recommended font is 'ter-732b.psf'. This is the font used within the Installer. {{:slackwarearm:49-ConsoleFontConfig-ConfirmChoice.jpg?400|}} == Continue Post Installation Configuration == {{:slackwarearm:50-HardwareClockSetting.jpg?400|}} {{:slackwarearm:51-TimeZoneConfig-Choose.jpg?400|}} {{:slackwarearm:55-ChooseDefaultVIeditor.jpg?400|}} == Configure GUI Window Manager == This author recommends using XFCE as it's light weight versus KDE. {{:slackwarearm:56-ChooseWindowManager-xfce-selected.jpg?400|}} == Continue Post Installation Configuration == {{:slackwarearm:57-rootpassword-asktoset.jpg?400|}} {{:slackwarearm:58-rootpassword-complete.jpg?400|}} == Slackware Setup Complete == {{:slackwarearm:59-SetupComplete.jpg?400|}} {{:slackwarearm:60-Setupmenu-EXITselected.jpg?400|}} === Reboot into the Slackware OS === {{:slackwarearm:61-Setupcomplete-Rebooting.jpg?400|}} 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 ([[https://www.youtube.com/watch?v=t3wKXMENTXk|Video tutorial]]). == Booting the Slackware OS == {{:slackwarearm:63-osbooted-loginprompt-rpi.jpg?400|}} == Login to the Slackware OS == {{:slackwarearm:osbooted-loginprompt-rpi.jpg?400|}} You may now login as 'root', using the password you set within the installer. ===== Post Installation Configuration ===== There are a few post-installation configuration tasks to complete. === Initial Time/Date Sync === If Internet access is available to the Raspberry Pi, prior to proceeding with any further setup, you may wish to set the time now as a one-off event: Elevate yourself to **//root//** and use **//ntpdate//**: $ su - # ntpdate rolex.ripe.net # or pick your favourite NTP server # hwclock -w # writes the date to the RTC # logout === NTP (Network Time Protocol) setup === Even if your Raspberry Pi has an RTC (as documented in this guide), you may wish to configure it to [[https://docs.slackware.com/howtos:network_services:ntp|set time from an Internet NTP Server]]. The Raspberry Pi requires continuous Internet access for this to function. === Add a plebeian user === You should add a plebeian (non-root) user using the 'adduser' tool. This is documented [[https://www.slackbook.org/html/essential-sysadmin.html|here]]. === KDE fixups === If you are using KDE, you need to first adjust a setting. As your plebian user, **prior** to loading KDE, run this command. This will disable the //Compositing// feature. This is required when using the mainline Linux Kernel (as Slackware does). kwriteconfig5 --file kwinrc --group Compositing --key Enabled false You may now start KDE. == Use a graphical login manager == If you prefer to use a graphical login manager, you can configure the default runlevel as 4: su - sed -i 's?id:3:?id:4:?g' /etc/inittab reboot ====== Managing Slackware on the Raspberry Pi ====== ===== Keeping the Slackware OS up to date ===== One of the preferred tools to keep your system up to date is [[slackware:slackpkg|slackpkg]]. **Upgrading the Kernel**: in Slackware x86/64 manual steps are required after upgrading the Kernel packages. In Slackware ARM, you simply upgrade the Kernel packages and reboot. If you make customisations to the OS InitRD (see below) these will automatically be re-incorporated during the upgrade process. ===== Loading Additional Linux Kernel Modules within the OS Proper ===== Often Kernel modules for discovered hardware will be automatically loaded, but occasionally you will need to manually configure the loading of some modules. /etc/rc.d/rc.modules.local This file is a shell script that is run as one of the last steps before the OS has fully booted. You can enter ''modprobe'' commands here to load the specific modules you require. Configuration files within the directory ''/lib/modprobe.d/'' can be used to configure the parameters of the modules. Existing files within that directory serve as reference examples should you need them. ===== Loading Additional Linux Kernel Modules early in the boot sequence ===== There are a number of peripherals that may require Kernel modules loading early on in the boot sequence. An example of this would be RTCs (Real Time Clocks) or storage controllers that are required to access the file systems on which the OS lives. Usually you won't need to load modules early in the boot sequence. See the previous section about loading modules from within the OS Proper. To load Kernel modules during the early boot sequence, read: /boot/local/README.txt As root, the easiest way to begin is by renaming the example script: mv /boot/local/load_kernel_modules.post.sample /boot/local/load_kernel_modules.post Then add the appropriate module loading commands to: ''/boot/local/load_kernel_modules.post'' You can also add shell code here to initialise a peripheral - writing something to the peripheral's Kernel interface, for example. ===== Slackware repository partition ===== The Slackware Installer image contains a type ''ext4'' partition labeled ''SLKins_aio-pkgs'' from which the packages are installed. root@slackware:~# mount LABEL=SLKins_aio-pkgs /mnt/zip root@slackware:~# cat /mnt/zip/README.txt This file system contains the Slackware repository that is used during the installation of Slackware. Once you've booted into your OS you can delete or change this partition if you wish, or perhaps you might like to retain it for future reference. root@slackware:~# Most users simply leave the partition alone, as it causes no issues. ===== Customising the Slackware Linux Kernel ===== If you'd like to customise the Linux Kernel, the easiest way is to follow the [[slackwarearm:cstmz_kernel|HOWTO]] guide and use the Slackware ARM Kernel build script to create new packages. This document also covers using the Raspberry Pi Kernel fork (although this is not recommended). ===== Reducing Boot Time ===== Slackware ARM ships with a generic OS InitRD (Operating System Initial RAM Disk - the environment that prepares the machine to boot the Operating System Proper), so as to support a wide range of Hardware Models. However, this isn't the optimal setup once the Slackware OS has been installed because the generic OS InitRD typically exceeds 250MB, which in some cases can add several seconds to the boot time whilst it's loaded from the SD card. The ''os-initrd-mgr'' (Operating System Initial RAM Disk Manager) tool has an option to synchronize the OS InitRD's Kernel modules with //only// those presently loaded within the Operating System. To do this: $ su -c 'os-initrd-mgr --sync-loaded-kmods' - # note the final - To have this setting persist across Kernel upgrades, you must upgrade the ''a/kernel-modules'' package before ''a/kernel''. If not, it'll revert to the generic OS InitRD until you next reboot. If you are using ''slackpkg'' to manage upgrades, this is handled for you. This option isn't the default, but you can make it so by following the instructions within ''/etc/os-initrd-mgr.conf.sample'' This way when you upgrade the Kernel packages in the order described above, it'll automatically synchronize the modules. os-initrd-mgr has a safety check to only proceed when the running Kernel and incoming Kernel are at the same major version and patch level. For example, when running Linux 5.17.1, upgrading to 5.17.2 will work; but an upgrade of Linux 5.17.1 -> 5.18.1 will require a reboot then to run os-initrd-mgr again to re-sync. If at any point you want to revert to the generic OS InitRD, simply reinstall the ''a/kernel'' package (and unset the setting if you configured it in ''/etc/os-initrd-mgr.conf''). ===== Managing the Raspberry Pi Firmware ===== Do not use the ''rpi-update'' script (found in other distributions) - this is unnecessary and is incompatible with Slackware. The Raspberry Pi firmware is managed by the Slackware packages. === Bootware === The Raspberry Pi boots from a FAT partition on the Micro SD card. This partition contains the closed-source proprietary boot loader, firmware and various other assets it requires. It is mounted within the Slackware OS under ''/boot/platform/hwm_bw'' (on other distributions these files reside within /boot). These assets are provided and managed by the Slackware package ''a/hwm-bw-raspberrypi''. Simply upgrading to the latest available Slackware packages will update this firmware. === Firmware for the EEPROM === The Slackware package ''a/hwm-bw-raspberrypi'' contains the available firmware that can be programmed to the Raspberry Pi's EEPROM. You also need to have the ''a/rpi-userland'' package installed. This firmware update requires manual action - see below To update the firmware on your RPi's EEPROM; as root: $ rpi-eeprom-update -d This will report if there's newer firmware available. To update the firmware: $ rpi-eeprom-update -d -a If the firmware was successfully updated, reboot: $ reboot The EEPROM tool configuration file is: ''/etc/rpi-eeprom-update''. By default we're using firmware from the "critical" (most stable and well-tested) release channel, but you can change it within that configuration file. === Raspberry Pi SoC/IP Core Firmware === The firmware for the peripherals on the Raspberry Pi Hardware Models is contained within the Slackware ''a/kernel-firmware'' package. Simply upgrading to the latest available Slackware packages will update this firmware. ===== Using Device Tree Overlays ===== [[https://github.com/raspberrypi/firmware/blob/master/boot/overlays/README|Device Tree Overlays]] can be configured within the Raspberry Pi's Native Boot Loader configuration file: ''/boot/platform/hwm_bw/config.txt'' Note: The Raspberry Pi's Native Boot Loader configuration is outside of the management of the Slackware OS so you need not be concerned with any automatic modifications. === Raspberry Pi 3: Enabling Blue Tooth === This does **not apply** to Raspberry Pi 4. The Raspberry Pi 3 requires that the serial connection be disabled in order to use Blue Tooth. To do this you need to edit one setting: == Elevate yourself to 'root' == $ su - == Configure the UART setting == $ nano /boot/config.txt Find the line: ''enable_uart=1'' Change it to: ''enable_uart=0'' Save the file and reboot. ===== Switching to the Raspberry Pi Kernel fork ===== The Raspberry Pi's are only intended to run the vendor's own Linux distribution, or to run as an 'Appliance' using the Raspberry Pi Linux Kernel fork. As a consequence, the upstream mainline Linux Kernel in which support for the Raspberry Pi is fragile and prone to breaking without notice. Slackware uses official upstream repositories/releases and has a no-patch policy. As such, the recommendation of using the vendor's own Kernel fork is far outside the scope of Slackware. Over time the fixes and new features for the Raspberry Pi will continue to appear in the main stream Kernel. However, if you are facing instability or need some specific feature that isn't yet available in the mainline official Linux Kernel, Slackware [[slackwarearm:cstmz_kernel_rpi|provides replacement Kernel packages]] that are built from the Raspberry Pi's Linux Kernel fork. Switching to the Raspberry Pi Kernel fork packages is **not** a recommendation, just an option for users who face instability. ===== Installing extra Software ===== Slackware comes with a good base of software applications, but there are plenty more available in the Open Source Ecosystem. The best way to add new software is to [[slackwarearm:sft-repos|use the build scripts from SlackBuilds.org]]. ===== Using the Serial/UART adapter ===== This documentation discusses using the Raspberry Pi without the UART/Serial console. If you'd like to use one, there are two that have been tested. === USB Serial Device converter: Prolific Technology Inc / PL2303 === This image below shows the PL2302 (the Serial adapter listed in the Hardware table at the head of this document) connected to the Raspberry Pi: {{:slackwarearm:100-asmrpi-serialadapter-pl2303-annotated.jpg?400|}} === USB Serial Device converter: FTDI / FT232RL == [[https://www.amazon.com/Adapter-Serial-Converter-Development-Projects/dp/B075N82CDL|This is the model]] shown here. {{:slackwarearm:moyina-ft232rl-rpi4-serialusbconverter.png?400|}} === Using the USB Serial Device converter on the Linux Host Computer === Once wired up, 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 ===== Known Limitations / Bugs ===== ^ Issue ^ Work around ^ Notes ^ | General fragility/instability | [[slackwarearm:cstmz_kernel_rpi|Transition to the Raspberry Pi Kernel fork packages]] | | ===== Contributing to the Slackware ARM project ===== There are a plethora of ARM devices on the market which requires initial R&D and continuous testing. If you'd like to help Slackware support more ARM boards, please check out [[https://arm.slackware.com/slackwarearm-devel/|the documentation]] explaining how to get involved. ===== Supporting / Sponsoring the Slackware ARM project ===== Maintenance of the Slackware ARM port takes not only a lot of time, but also has financial costs such as the on-going use of electricity, Internet hosting and purchasing and maintenance of ARM hardware. Once you find yourself enjoying using the ARM port of Slackware, please take a few moments to [[https://arm.slackware.com/sponsor/|show your appreciation through sponsorship]]. ===== References ===== [[https://pinout.xyz/pinout/uart|RPI GPIO exposition]] [[https://cdn.mos.cms.futurecdn.net/kSo96fYwdrfQKSvALMKqzc-970-80.png|RPi4 GPIO pin layout (credit: Les Pounder]] [[https://cdn-learn.adafruit.com/downloads/pdf/adding-a-real-time-clock-to-raspberry-pi.pdf|Adafruit RTC wiring documentation]]