Slackware ARM on a Raspberry Pi
rpi-update - An easier way to upgrade your Slackware ARM system?
IMPORTANT! 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 using the 'rpi-update' tool.
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. 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, and say "Yes" to any questions. The upgrade process is entirely autonomous.
An alternative, and better, 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.
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 SARPi.FatDog.EU (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:
As 'root' user you can run rpi-update at any time to upgrade your kernel and firmware.
The kernel version(s) installed by 'rpi-update' 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 which kernels have been built by the SARPi Project.
If you need to find out which kernel your Slackware ARM system is running you can do so with the 'uname -r' command.
You can run rpi-update by typing the following command:
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.
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:
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 'exit' or 'logout' command, like this:
You're now logged in as 'dave'. You will not be prompted for a password when exiting from 'root' user back to a normal user.
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