Slackware ARM on a Raspberry Pi


rpi-update - An easier way to upgrade your Slackware ARM system?

This page contains some very significant and seminal information. Please make sure you read it thoroughly and understand what you're doing before attempting to upgrade your Slackware ARM system on the Raspberry Pi.

rpi-update is a tool created by Hexxeh for upgrading your Raspberry Pi 1/2/3 boot firmware, kernel, and kernel modules, with one simple command. It's very convenient and easy to use, although not totally in-line with the "Slackware way". Slackware ARM has its own package management system but rpi-update circumvents all that and installs every thing for you in one go, 'apt-get -y install' fashion (i.e. it installs new boot-firmware/kernel/kernel-modules and says "Ok, just do it!" to any questions). Which isn't always the best thing to allow because you don't really know what's being installed, or upgraded, or overwritten, or deleted, on your Slackware ARM system. Using 'pkgtool', or 'slackpkg', puts you in total control of your package management on a Slackware system. Whereas, rpi-update takes away that control and does what it's programmed to do, which is; upgrade the boot firmware, kernel, and kernel modules, after backing up any existing files. It's totally autonomous after you say "Yes" to the upgrade process.

An alternative solution would be to manage/install any upgrades yourself. If required, the SARPi kernel, kernel modules, and boot firmware packages (.txz) are available on the SARPi downloads page and are updated quite often. Compiling a custom kernel is always an available option, if that's your preferred method of upgrading.

FatDog says ... It goes without saying that automated processes can go wrong when you least expect it. So, it's always a good policy to back things up before you go ahead. There have been some reports that rpi-update can break your system but in the years that we've been testing with it at FatDog.NL (since October 2012) it hasn't given us much trouble at all. If you want to use rpi-update just make sure you have at least ~20MB free space on your /boot partition before running it, to avoid any issues.

You don't have to use rpi-update, there's always the manual method. The choice is entirely yours.

Type the following command as 'root' user to download and install rpi-update:

root@myrasbox:~# wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && chmod +x /usr/bin/rpi-update

As 'root' user you can run rpi-update at any time to upgrade your kernel and firmware.

FatDog says ... The stock kernel versions supplied by the Raspberry Pi repository always have a "+" suffix (e.g. 4.4.9-v7+) and these are what you will be installing when you use 'rpi-update' to upgrade. The SARPi Project kernel versions always carry an "-arm" suffix (e.g. 4.4.8-v7-arm) which is what you will use and install with any of the Slackware ARM installers and kernel packages that are available from the SARPi downloads section. This is so you can tell the difference between RPi repository kernels and SARPi Project kernels.

If you need to find out which kernel your Slackware ARM system is running you can do so with the 'uname -r' command.

root@myrasbox:~# uname -r
4.4.38+

FatDog says ... IMPORTANT! : If you are running a 4.9.x kernel DO NOT run the rpi-update command without the 'BRANCH=next' option. If you do your 4.9.x kernel will be overwritten with a 4.4.x kernel because at this moment in time (06 January 2017) that is the default kernel version supplied by the Raspberry Pi repository. The Raspberry Pi Foundation are planning to move to the 4.9 Linux kernel in the near future but for now it's business as usual for systems running a 4.4.x kernel.

So, depending on which kernel your system is using, you can run rpi-update by typing one of the following commands:

If your system is running a 4.4.x kernel then you should use the following command:

root@myrasbox:~# rpi-update

If your system is running a 4.9.x kernel then you need to use the following command:

root@myrasbox:~# BRANCH=next rpi-update

So go ahead and run it now.

rpi-update then checks your system against any new updates, backs up existing files, and upgrades them accordingly. You are given the option to say yes or no [Y/n] to the upgrade but other than that it's all automatic.

You should see that the system is being updated with the latest firmware, kernel, and kernel modules. In the examples, our system was using kernel 4.4.8-v7-arm and that's been upgraded to 4.4.9-v7+. The kernel version you'll update to will (hopefully) be a lot more recent.

If there were no errors, the update was a success and you are advised that a reboot is needed to activate the new firmware.

Type 'reboot' at the command prompt and press the enter key.

root@myrasbox:~# reboot

After rebooting

After the system has rebooted, at the login prompt enter the name of the normal user that you specified in the previous section of this tutorial (i.e. NOT 'root') and enter the password you've set for this user during the account creation process. Remember that we used 'dave' as an example for our normal user account name. You should enter your own username here.

When you are logged in to your Slackware ARM system as a normal user there may be occasions when you require 'root' access. To change from a normal user to 'root' user type 'su -' at the command prompt:

dave@myrasbox:~# su -

Enter the root user password when prompted. You should now be logged in as root user. This is how you should always change from a normal user to 'root' user on your Slackware ARM system.

When you need to change from root user back to a normal user you should use the same 'su -' command followed by the normal users username. Use the following command (substituting your own username) to achieve this:

root@myrasbox:~# su - dave

You're now logged in as 'dave'. You will not be prompted for a password when changing from 'root' user to a normal user.

FatDog says ... NB: Always remember, 'root' user is all powerful on a Linux system and should only be used when abolutely necessary! It is IMPORTANT never to use the 'root' user for doing things that you can do under a normal user account.

Logging in as a normal user is always good policy. Sometimes after an update, logging in remotely (via ssh) as root is not permitted, which is an added security feature. To enable remote login via ssh with 'root' user you'll need to edit settings in the /etc/ssh/sshd_config file and allow it. Or, you can just download and install the SARPi rpi-hacks package from the downloads section. You can also achieve this by adding a ssh public key in the /root/.ssh/authorized_keys file. This is something we're not going to cover in this tutorial.

You now have the option to Optimise Your System Configuration and customise the system configuration and parameters of your Slackware ARM system.

Otherwise, continue to the the final section of this tutorial... Post-installation information



Updated: 08 Jan 2017 02:01:47