You are here

Installing STLinux on Ubuntu

Overview

For users using the Ubuntu distribution it is very likely that the STLinux install script will fail unless some additional packages have been installed. This mini guide explains the steps required to make sure that the STLinux installation executes properly. These steps are only required once when installing STLinux for the first time.

Two package management systems: DPKG and RPM

The difficulty comes from the fact that Ubuntu uses the Debian package management system DPKG whereas STLinux is distributed as a set of RPM packages. Therefore ... we need two package management systems!

  • the DPKG package management system (already installed)
    • contains a number of databases in /var/lib/dpkg
    • keeps track of the packages installed by the Ubuntu distribution

  • the RPM package management system (not yet installed)
    • will use databases located in /var/lib/rpm (or /root/.rpmdb on Ubuntu 10.10)
    • will keep track of the packages installed by the STLinux distribution
    • is available as the rpm Ubuntu package

Make /bin/sh bash

Some of the scripts in the STLinux distribution assume that /bin/sh is bash, while on Ubuntu it is frequently dash. First, make sure that bash is installed (this will fail if it is already installed, but that is OK), and then update your system to use bash as /bin/sh (answer 'No' to the question):

host% sudo apt-get install bash
host% sudo dpkg-reconfigure dash

Installing RPM on Ubuntu

Install the rpm package using apt-get:

host% sudo apt-get install rpm
This initializes the databases in /var/lib/rpm (or in /root/.rpmdb on Ubuntu 10.10), but they are empty as no RPM packages have been installed on the system yet.

Install additional packages for stmyum using apt-get:

host% sudo apt-get install python-urlgrabber python-rpm python-sqlitecachec

Populating the RPM databases with "Provides"

For Ubuntu users, an extra stlinux24-host-STLinux_deps package is provided which needs to be installed prior to attempting to install the STLinux distribution. It simply gives the RPM package management system a list of all the "Provides" entries that will be required when installing STLinux.

STLinux 2.4

If you are using an ISO image then you will find this RPM in the misc subdirectory of the installation disk.

host% sudo rpm -ivh misc/stlinux24-host-STLinux_deps-20110126-1.i386.rpm

This package is also available on our FTP site here: http://download.stlinux.com/pub/stlinux/2.4/misc/

Note: As of Ubuntu 9.10 you will have to force installation of the rpm using the --force-debian switch:

host% sudo rpm -ivh --force-debian http://download.stlinux.com/pub/stlinux/2.4/misc/stlinux24-host-STLinux_deps-20130321-1.i386.rpm
The version number gives the date the package was built, simply use the latest available version.

STLinux 2.3

The stlinux23-host-STLinux_deps package must be installed to populate the RPM databases. It simply gives the RPM package management system a list of all the 'Provides' entries which will be required when installing STLinux.

host% wget http://www.stlinux.com/sites/default/files/stlinux23-host-STLinux_deps-0.1-5.i386.rpm
host% sudo rpm -ivh stlinux23-host-STLinux_deps-0.1-5.i386.rpm

Note: As of Ubuntu 9.10 you will have to force installation of the rpm using the --force-debian switch:

host% sudo rpm -ivh --force-debian stlinux23-host-STLinux_deps-0.1-5.i386.rpm

CAUTION: The list of capabilities that are added to the RPM databases are not checked. For example, it adds an entry for 'GCC' even if the GCC compiler was not installed as an Ubuntu package. It is up to the user to make sure all the listed capabilities are properly installed.

Install STLinux

We next install the distribution as usual, by running the install scripted with the added -d (for Debian) flag. Run the install script, either from the ISO image or, if the STLinux FTP site is locally mirrored, from the stlinux/2.3/ directory. For example:

host% sudo ./install -d all-sh4-glibc