Tuesday, May 14, 2024

Slackware64 in a Raspberry Pi 3 Model B

Slackware also provides a version for ARM processors. The installation depends on the ARM implementation and system you are using. Here I'm installing Slackware on an RP3B, to use it as a file server (NFS) and a media server over DLNA.

My main source of information is from Sarpi, this post is just a summary of their "How to ...". 

Installation

First, download:

- Installer image: sarpi3_64-installer_slackcurrent_03May24_sp1.img.xz

- Slackware: rsync -Pravv --delete slackware.uk::slackwarearm/slackwareaarch64-current .

Then, a micro SD card is used to boot the RP and start the Slackware installer. The Slackware root directory (installation files) is stored in a USB stick. 

- Write the installer image to a micro SD card.

- Write the Slackware files to a USB stick.

Alternatively, if you have used the micro SD card to boot the RP before, you can just copy the boot files from the image and delete the old files in your micro SD. This is handy if you are reinstalling Slackware over the same system.

Slackware will be installed in the same micro SD card used to boot the installer. Then, we need to create the partitions to hold the system. That is the boot, swap and root. The boot partition was already created when writing the installer, so you only need to make the other two.

To enable the network interface from the boot and start an SSH server, edit the file 'cmdline.txt' appending the following:

kbd=de nic=e1000:eth0:static:192.168.2.7:24:192.168.2.254

I used a static IP address because my router is slow in assigning it dynamically. So slow that the installer cancels the SSH server start before getting an IP.

When connecting to the installer via SSH, it is common to get the message "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!" and the connection is closed. To avoid that, delete the keys for that IP from your ~/.ssh/known_hosts file.

Connect to the RP's SSH server: ssh root@192.168.2.7

# setup

After installation, don't reboot immediately.

At this point, the future root tree of Slackware is mounted in /mnt. So, if for some reason you reboot the RP and the installer boots up again (ups...), you have to mount, manually, the partition containing / (/dev/mmcblk0p3 for example) in /mnt. By doing so, you can continue with the configuration.

Now, remove some unnecessary packages:

# ROOT=/mnt removepkg kernel_armv8 kernel-*-armv8

Next, remove the initramfs file from the boot partition. Mount the boot partition in /mnt/boot and then:

#  rm /mnt/boot/initramfs.xz

Install some extra RP exclusive packages:

# ROOT=/mnt installpkg /rpi-extra/kernel* /rpi-extra/sarpi*

Now you can update your config files.

And finally, reboot the system.




References: 

https://sarpi.penthux.net

https://alien.slackbook.org/blog/remote-installation-of-slackware-using-ssh/

No comments: