SARPi Project - Slacking on a Raspberry Pi


An easy way to upgrade your kernel and firmware?

SARPi Project muse views ... IMPORTANT! This page contains some very significant and seminal information. Please make sure you read it thoroughly and fully understand the implications of what you're doing before attempting to upgrade your Slackware Linux system on the Raspberry Pi using the 'rpi-update' tool.

'rpi-update' is a 3rd-party tool created for Raspberry Pi OS by Hexxeh. This tool updates/upgrades your Raspberry Pi's boot-firmware, kernel, and kernel modules, using one simple command. It also works on Slackware Linux but is not in-line with the "Slackware way". It's very convenient and easy to use, and is available for those who aren't concerned about managing the update/upgrade process themselves. 'rpi-update' is available as a seperate download and is not included within Slackware Linux, or any SARPi installers. However, the SARPi Project has created a rpi-update package for Slackware Linux, for those who might be interested in using it.

Slackware Linux has it's own package management system (pkgtool and related command line tools) 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 Linux system. Using 'pkgtool', or 'slackpkg', puts you in total control of your package management on a Slackware Linux 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. Things can go wrong when you least expect it, and 'rpi-update' is no exception.

Quick Links

Installing rpi-update
Running rpi-update
Rebooting after rpi-update
Accessing root user from a normal user account

SARPi Project muse views ... WARNING: On Slackware Linux, the 'rpi-update' tool should be used WITH EXTREME CAUTION!

The tool itself, when executed, warns you that, "This could result in a system that will not boot." and "rpi-update should only be used if there is a specific reason to do so" That in itself should be reason enough to question whether one should be using it, or not.

NB: The SARPi Project's opinion is that you shouldn't use 'rpi-update' to update Raspberry Pi kernels and firmwares on a Slackware Linux system. You should use existing Slackware Linux supported tools such as 'pkgtool' or 'slackpkg', or the manual method, of installing packages. Ultimately, the choice is entirely yours.

See the following screenshot for reference.

rpi-update WARNING!

It's your choice to use 'rpi-update', or not. Convenience is all well and good, but ignore the warning(s) at your own risk!

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

NB: If you choose to manage any Slackware packages yourself (i.e. installing, upgrading, removing), and are in need of instructions on how to perform this task, please refer to the Slackbook package management page on the Slackware Documentation Project website.

SARPi Project muse views ... 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. If you want to use 'rpi-update' just make sure you have at least ~50MiB free space on your /boot partition before running it, to avoid any issues.

NB: Please be aware that the inclusion of, and any related 'rpi-update' content within, this website does not indicate that the SARPi Project condones or endorses the use of it, in any capacity. This is a tool for those who don't know any different/better, and best suited to those who are too lazy to learn or can't be bothered, with the understanding that using it may produce unexpected and/or terminal results. The SARPi Project does NOT offer support on 'rpi-update' issues. You should submit any 'rpi-update' related questions, or support requests, to Hexxeh.

Installing rpi-update

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

root@iana:~# wget https://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, kernel modules, and firmware.

SARPi Project muse views ... The kernel version(s) installed by 'rpi-update' always has a "+" suffix (e.g. 6.6.20-v8+). These kernels are downloaded and installed from the Raspberry Pi GitHub boot-firmware repository when you use the 'rpi-update' tool to upgrade your system.

The SARPi Project kernel versions always carry a '-sarpi' suffix (e.g. 6.6.20-v8-sarpi5) which is what you will see when using any of the SARPi installers and kernel packages that are available from the SARPi downloads section. The '-sarpi' suffix is so that the kernels which have been built by the SARPi Project can easily be identified.

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

root@iana:~# uname -r
4.4.38+

Running rpi-update

You can run 'rpi-update' by typing the following command as 'root' user:

root@iana:~# '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.

rpi-update

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 6.6.20-v8- and that's been upgraded to 6.6.20-v8+. The kernel version you'll update to will (hopefully) be a lot more recent.

rpi-update

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

SARPi Project muse views ... The 'rpi-update' process will backup your previous /boot files into a new /boot.bak directory on your system. Ultimately, if things do go wrong then your previous /boot files can be reinstated from this backup.

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

root@iana:~# reboot

Hopefully you'll be greeted with a login prompt, very shortly. Fingers Crossed

Rebooting after rpi-update

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.

Once you've logged in type the following 'uname -a' command:

dave@iana:~# uname -a

This will output something similar to the following system information:

login

In the above screenshot we used the 'rpi-update' command as a normal user, just as an example. The Slackware Linux system wouldn't allow us to run it. That's because 'rpi-update' requires 'root' user access and a normal user does not have those same permissions. The 'rpi-update' command output states "!!! This tool must be run as root" and that's a clear indication that our 'dave' user is not allowed to execute this command.

Do you need to login again as 'root' user and not a normal user? Well, that's one way of dealing with this conundrum. However, there is a much simpler and easier way to address this...

Accessing root user from a normal user account

There will be times when a normal user does not have permission to use some commands or access certain files and areas of the system. That's usually because they are restricted to 'root' user or designated users of a specific group only.

SARPi Project muse views ... When you are logged in to your Slackware Linux 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. This is how you should always change from a normal user to 'root' user on your Slackware Linux system.

When you need to change from root user back to a normal user you should use the 'exit' or 'logout' command.

To elevate to 'root' user from a normal user account, type 'su -' at the command prompt:

dave@iana:~# su -

You will be prompted to enter the 'root' user password. If successful you will be elevated to 'root' user.

SARPi Project muse views ... NB: The hyphen in the 'su -' command is significant for two reasons:

1. It switches the current directory to the home directory of the new user - e.g. to the /root directory in this example.
2. It changes the environmental variables to those of the new user. That means, if the first argument to 'su' is a hyphen, the current directory and environment will be as if the new user had effectively logged in to a new terminal session, rather than just joining it as an extension of an existing session.

* The 'su -' command not only works in this way for 'root' user, but for all other users on the system too.

The following screenshot shows this process:

su - root

In the screenshot above you can see we've used the 'whoami' and 'pwd' commands to instruct the system to output our username and current working directory on our normal user and 'root' user accounts. This is just to show an example of how we have changed users, home directories, and environments from one to another by using the 'su -' command.

When you want to go back to using a normal user account from being 'root' user, or depart from any other user account, type either of the following command(s):

root@iana:~# exit
root@iana:~# logout

We're now back on our 'dave' account once again.

You will not be prompted for a password when exiting from 'root' user back to a normal user. You'll only be asked for the password of an account, other than your own, when accessing it and logging in to it from an existing terminal session. The 'root' user is omnipotent on their own system and is not prompted for passwords to access normal user accounts.

SARPi Project muse views ... 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. Installing the 'sarpi*-hacks' package (available from the downloads section) will also accomplish this - read the example sarpi-hacks.README file for more details. 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 but there is a HOW TO configure SSH login without entering a password SARPi mini-project which covers it.

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

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

Back to Top


Updated: 2024-03-06 09:19:05 UTC

Disclaimer: The SARPi Project website is for non-commercial and general information purposes only. The content is provided by Penthux.NET and while we endeavour to keep information up to date and correct, we make no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability or availability with respect to the website or any information, software, products, services, or related graphics which is available on the website for any purpose. Any reliance you place on such information is therefore strictly at your own risk. In no event will Penthux.NET be liable for any loss or damage including without limitation, indirect or consequential loss or damage, or any loss or damage whatsoever arising from loss of data or profits arising out of, or in connection with, the use of this website or any of its contents. Through this website you are able to visit other websites which are not under our control. Penthux.NET has no influence over the nature, content or availability of any external URLs. The inclusion of any URLs does not necessarily imply a recommendation or endorsement of any content therein. Every effort is made to ensure the SARPi Project website remains accessible. However, Penthux.NET takes no responsibility for, and will not be liable for, the SARPi Project website being temporarily unavailable due to technical issues beyond our control. SARPi Project is in no way affiliated with Slackware Linux, Inc, or the Linux Foundation, or Raspberry Pi Ltd., or any of their respective members, trustees, partners, or associates.


Accept!

SARPi Project uses cookies for website traffic data analytics purposes only. Cookies from this website do not collect or store any of your personal data.

Please read the SARPi Project website [ Cookie Policy ] for more details.