SARPi Project - Slackware ARM on a Raspberry Pi
Rebooting for the first time after installing Slackware ARM Linux
It may take a minute or two when booting your Raspberry Pi for the first time after installing Slackware ARM Linux. Don't worry, this is normal. The next time you boot/reboot it will be much quicker.
You might find at this point that you cannot see the first few characters or word(s) of the text on your screen. On some displays, particularly LCD screens/monitors, just disabling overscan will make the picture fill the whole screen and correct the resolution. For other displays it may be necessary to leave overscan enabled and adjust the overscan values. If this is a problem for you, take a look at the Boot Config section where you can find out how to enable/disable overscan and configure settings.
Eventually you will be prompted to login. You should use the following credentials at this point:
password: ** the password you specified for the root user account **
Note that the hostname of your Linux system has now changed from 'slackware' to the name you gave in the HOSTNAME setting during setup. For the purpose of this tutorial, the hostname of our Slackware ARM system is 'myrasbox'.
Check the system time/date before updating
After rebooting it's always a good idea to make sure the system time and date are accurate. Or else it may cause errors and/or give you problems. Use the following command to verify the system time:
You should do this, as a 'good-practice' habit, each time you (re)boot the system. If the time is not set accurately use the 'date -s "DAY MONTH DATE HH:MM:ss YEAR"' or 'date MMDDHHmmYYYY' command(s) the same as you did previously to achieve this. If you have an internet connection you can use the 'ntpdate' command like this:
Once you have set the correct date/time, or at least verified that the system time is relatively accurate, it's the perfect time to add a normal user account! :-D
Creating a normal user account - IMPORTANT!!!
The first thing you should do after rebooting your Slackware ARM system, before anything else, is to create a normal user account. You need to do this because you should never work as 'root' on your system unless you really need to. So for the purpose of every day use you should create a normal user account, of any name, and give it a password, and each time you log-in you should use this account and not 'root' user.
You can break things very easily as the 'root' user and this is why it should never be used as a normal user account on any Linux system. Another reason is that after the system is updated with all the available new Slackware ARM packages, if openssh was one of those packages, and you chose to Overwrite your settings, you will not be able to log in as 'root' remotely (via ssh). As a security measure, remotely logging in as 'root' user is no longer permitted by default. In this event you need to login as your normal user and then use the 'su -' command to access the 'root' user to reconfigure your system settings.
To add a user account use the 'adduser' command followed by the username you want to assign it. We'll call our normal user 'dave' as an example. You add a new user like this:
Example: adduser dave
Go through the account creation setup and create a new user account, filling in any details you require for this user and setting a password. From now on, always use this username and password for logging in and only use 'root' when it's absolutely necessary.
Now all that's out of the way, let's move on to updating the system with the latest available Slackware ARM packages.
Keeping updated with slackpkg
To keep your Slackware ARM Linux system totally up-to-date with the latest releases of available packages, there's a very useful package management tool called 'slackpkg' which is included as standard with Slackware [ARM].
For more details on slackpkg commands, options, and configuration, read the man pages:
root@myrasbox:~# man slackpkg.conf
To get started, type 'slackpkg help' at the command prompt.
You may often see a message on your screen that slackpkg is asking you to edit a file containing a list of Slackware ARM mirrors. This can happen after an update where the mirrors file has been overwritten by a newer one. This file can be edited easily using 'nano', a simple text-editor included with Slackware. Type the following command to edit the slackpkg mirrors file:
Scroll down the file until you see the following section:
You are required to edit/unhash/uncomment one of the lines (and ONLY one line) which is an address of a Slackware ARM 14.2/current mirror. We selected 'ftp://slackware.uk/slackwarearm/slackwarearm-current/' because that's the version we've installed. You should use a mirror for the version (i.e. 14.2 or current) which you have installed. Or specify your own.
Notice in the screenshot above we have removed the '#' from the beginning of only ONE line that is the FTP server address for a Slackware ARM current mirror. If you've have installed Slackware ARM 14.2 then select an appropriate mirror (i.e. NOT current). This is what slackpkg needs you to do before you can download/install any updates.
IMPORTANT! DON'T select the wrong Slackware ARM mirror for the version you have installed or you will end up with a broken/corrupt system!
Once you have correctly edited the slackpkg mirrors file, you need to save and exit that file. Do this by pressing and holding the CTRL key and pressing the 'X' key once, at the same time. You will be asked to 'Save modified buffer?' at which point you just press the 'Y' key followed by the enter key to save the file under the same filename.
Updating slackpkg GPG key
The first time you run slackpkg you should update Slackware's GPG key. You can achieve this with the following command:
Slackware's GPG key doesn't change. This should be a one time only command. So, once you've ran it, you can basically forget about it.
To download the latest package lists from a Slackware ARM mirror type the following on the command line:
The results of running this command should be something similar to the following:
If you have installed Slackware ARM current then you are strongly advised to run the following slackpkg command before upgrading any existing packages:
NB: Slackware ARM current users should run 'slackpkg install-new' right after running 'slackpkg update'.
The list of new packages are always selected by default. If you have a large list of new packages and you would rather have them all initially deselected, use the '-onoff=off' command option. Like this:
You should be presented with a list of new packages which are available to install. As shown in this example screenshot:
You have total control over which new packages you wish to install or omit. Navigate through the list of available new packages using the up/down cursor keys (these will be installed if they have a '*' at the side of them) and select/deselect using the [spacebar] key. When you have chosen the packages you wish to install press the [Enter] key, making sure < OK > is highlighted at the bottom. You can switch between < OK > and <Cancel> using the left/right cursor keys. This will install any selected [*] new packages that have been added to the official Slackware package set.
Next you need to tell slackpkg to upgrade any and all of your existing packages if updates exist. This is the "good" way to upgrade the entire system. Do this by typing the following at the command prompt:
If there are no available new packages to be installed you will receive a message similar to the following:
If any updated packages are available you should see a screen similar to the one below. Use this now familar method, the same way in which you have done previously, for selecting/deselecting upgraded packages. This will upgrade any currently installed packages that have been selected. When a package upgrade is highlighted in this list the name of the currently installed version appears at the bottom of the screen. So you can see which package version you currently have installed and which version you'll be upgrading to.
The packages you have selected will be upgraded, one after another if you've selected more than one, until all selected updates have been installed.
In our example '.new' configuration files have been found in the packages we've just installed. When there are '.new' files found you will be prompted to Keep, Overwrite, or Remove, them altogether, or Prompt to Keep/Overwrite/Remove for each individual file. If/when '.new' configuration files are available you may want to review any changes before allowing them. So, Prompt would be the best option for you. Or you can choose to keep all your existing configuration settings and Remove any '.new' files. Or you can choose to Keep all your current configuration settings and review/update any '.new' files at a later date. The example above shows we have chosen to Overwrite our existing system configuration settings with '.new' files. In our case it's safe to do so because we haven't done any customising of the system, or changed any of the default settings. You may choose the same option but, if you have modified/customised the system configuration in any way you may want to select another option here.
IMPORTANT! If you have not made any changes to your system configuration then choosing to Overwrite any existing configuration settings with '.new' files is quite safe. Alternatively, if you have made any changes to your system configuration files, be aware that your custom settings may revert back to their defaults when Overwrite is selected!
When slackpkg has finished updating, your Slackware Arm Linux system should now be fully up-to-date with the latest available packages. You can run slackpkg anytime from the command prompt (as 'root' user) and install any new packages as and when they become available. If any errors occured you will be shown an error log at the end of the process.
We're not quite done with configuring and updating just yet, as you'll see in the next section... rpi-update