My FREESCO page | A FREESCO is born | Adding Slackware binaries

Adding Slackware binaries

While FREESCO is a great piece of software, it has some limitations. One is its limited set of available commands. As the software has to fit on a floppy, many commands available in a normal Linux distribution have been left out. Thanks to Dingetje, there is a utils package which install many GNU tools. Another way to add commands to FREESCO is by adding Slackware binaries and this is what this tutorial covers.

This tutorial assumes that you have FREESCO installed on a HD.

[ Top ]


Look up package

FREESCO uses an old Linux kernel, 2.0.39, which means that binaries from new distributions can not be run on FREESCO. However, Slackware 3.9 is based on the same kernel as FREESCO and using these Slackware binaries usually work great. Earlier these binaries (available as packages) were downloadable from the main Slackware site. Nowdays the 3.9 version is no longer available from the Slackware site. Slowpoke posted this note with URLs to sites that still have the 3.9 release available. I use ftp://ftp.slackware.no/pub/linux/slackware/slackware-3.9/ for this tutorial, but any of the given sites should work for you.

Slackware packages are ordered in categories with rather cryptic names such as a1, n2, x1, etc. Even though there are explanations to these names, just finding a package by browsing the categories can be complicated. Instead, I use the Slackware Package Browser to look up packages. With this browser you can enter the name of a package/file and find out in which category this package/file is located in (if any). Unfortunately this browser only looks up the packages/files in the latest versions of Slackware. This means that the category reported by the browser might differ from the category where the package/file was located in 3.9. Still this will give you a starting point. Once you know the category for the current release, you can look for the file among the 3.9 packages. You may also look for the package/file in the file list which lists all packages availabe for Slackware 3.9.

I will demonstrate this process by trying to locate the package for md5sum, a command to calculate a md5 checksum for a file.

First I go to the Slackware Package Browser and search for md5sum. There is no package available with that name, but when I search for a file with that name I get two hits: coreutils and python. The later doesn't sound too interesting but the first one look promising. Click on the link to get more information about the package:

coreutils (core GNU utilities)

These are the GNU core utilities, the basic command line programs
such as 'mkdir', 'ls', and 'rm' that are needed for the system to
run.  This package is the union of the GNU fileutils, sh-utils, and
textutils packages.  Most of these programs have significant
advantages over their Unix counterparts, such as greater speed,
additional options, and fewer arbitrary limits.

Now I know that the file is located in the coreutils package in the current release. The next thing to do is to look that package up in the 3.9 release. Let's open the file list for Slackware 3.9 and look for the file.

Unfortunately there is no file with that name. However, the description from the package browser said that this package is a union of other packages: fileutils, sh-utils and textutils. None of the packages mentioned in the description exist in the file list. However, there is a package called fileutls which is located in the category a5. Let's take a look at the description of that package. Go to the package directory and enter the a5 directory. There you will find a file named diska5 which is description of the packages in this category. Click this file to display it in your browser and see the description of the package. Unfortunately the description does not include the md5sum file.

Once again take a look at the file list. There is a package called sh_utils (notice the underscore!). Maybe this is the correct package. The package is located in the category a12 but according to the description of the package, the md5sum is not included there. Look at the file list once again. There is no textutils package, but there is a package named txtutils available in the a14 category. The descriptions file contains the following information:

txtutils: The programs in this package are: cat, cksum, comm, csplit, cut, 
txtutils: expand, fold, head, join, md5sum, nl, od, paste, pr, sort, split,
txtutils: sum, tac, tail, tr, unexpand, uniq, and wc.

Finally! md5sum is a part of the txtutils package, located in the a14 category. Now it is time to download the package and install the md5sum binary.

[ Top ]


Install the binary

The first step is download the package. Log in to your FREESCO as a super user. Move to your home directory by doing

[root@Freesco] cd
/mnt/bootdev/router/pkg/home/root

Create a directory to download the package to and then enter that directory:

[root@Freesco] mkdir pkgtest
[root@Freesco] cd pkgtest

Now get the package file using the snarf command. The command takes an URL as argument and the URL to the txtutils package is ftp://ftp.slackware.no/pub/linux/slackware/slackware-3.9/slakware/a14/txtutils.tgz:

[root$Freesco] snarf ftp://ftp.slackware.no/pub/linux/slackware/slackware-3.9/slakware/a14/txtutils.tgz

You should see something like this after issuing the command:

ftp://ftp.slackware.com/pub/slackware/slackware-3.9/slakware/a14/txtutils.tgz (291K)
txtutils.tgz              [#####                   ]      62K |    8.05K/s

The above indicates the download process. When the package is downloaded some information is displayed and you are back at the prompt:

298922 bytes transferred in 36.49 sec (8.00k/sec)
[root@Freesco]

By now the package is downloaded to your machine as a .tgz package and it is time to unpack it. If you are used to Linux, you probably know that you usually unpack this type of files with something like

$ tar -zxf <file_name>

Unfortunately the tar command is not included in FREESCO by default (but is available in the utils package) so you have to use star and zcat instead:

[root@Freesco] zcat < txtutils.tgz | star

The package is unpacked and to see the content of the package just use the ls command:

[root@Freesco] ls -F
txtutils.tgz  usr/           bin/           install/

As you notice, the package is expanded to three directories. Browse through them to see the content of the package. The md5sum binary is located in usr/bin. Enter that directory and run the command to verify it works as supposed:

[root@Freesco] ./md5sum split
3a0393ed178949af61e04a434f607faf  split

The command calculates the checksum for the split binary and presents it. The command seems to work as expected. The final step is to move the binary so it accessible without specifying the full path to it. Move the binary to /usr/bin:

[root@Freesco] mv md5sum /usr/bin

Now verify that you still have access to the md5sum binary:

[root@Freesco] md5sum split
3a0393ed178949af61e04a434f607faf  split

You have now successfully installed the md5sum binary on your FREESCO!

[ Top ]


Page author: My email

Last modified: Mon May 5 20:45:21 CEST 2008

Valid HTML 4.01!