You are here

Tagfiles in Slackware

Error message

Notice: Undefined variable: _POST in include_once() (line 1 of /customers/5/b/f/

You might have heard of tagfiles in Slackware? They are actually used to quickly install Slackware without having to pick each package you want to install. The tagfiles are text files which contain information about which packages you want to install, and those files can be used again under your next Slackware installation, which will save you a big amount of time - whether the next time will be a reinstallation or you want to install Slackware on several other computers. Here we will go through the steps on how to make tagfiles, using the powerful command line.

The first thing you need to do is get a copy of the Slackware Linux distribution. You can either download the iso-images for free or buy CD copies (and support the Slackware project) by visiting this web page. I will use the iso-images in my examples, but it's pretty much the same whether if you use the CDs (I'm assuming you know how to mount a CD-ROM).

You can mount each of the iso-image with the following commands:
$ mkdir slack
$ mount -o loop slackware-12.0-install-d1.iso cd1

As you already might know, Slackware is divided into several package classes. The first installation image contains package classes like. a, d, f etc. under the subdirectory slackware. Each one of these directories have their very own tagfile which lists every package in that package class, and whether it's recommended (REC), optional (SKP), added (ADD) or skipped (SKP) under the installation process. Take a look at the files, and you'll understand how this works

What we are going to do now, is copy the directory structure and tagfiles using a bash script. Well, here we go, it's short and sweet:
for i in slack/slackware/*
if [ -d "$i" ]
mkdir tags/$i
cp $i/tagfile tags/$i/tagfile

Make sure you first create the tags and tags/slackware directories using the mkdir from command line. Name the script (for example), make it executable with chmod +x Launch it for each of your Slackware installation images with the ./ command.

Now you can start editing your tagfiles. If you are lazy as I am, you want to speed this up a lot using some powerful tools from the command line. Lets take a look at the kdei/tagfile. I don't want to install any of those packages, so instead of typing SKP for all those packages, I simply use sed.

$ sed -i 's/OPT/SKP/g' kdei/tagfile

Will change every single package marked with OPT to being marked with SKP. If I replace OPT with REC in the command all the recommended packages in the kdei class will be marked with SKP. Try! Play around a bit, ADD som packages, and you'll soon see what a time saving sed really is.

Once you've finished setting up your tagfiles, store them a place where you can reach them from the Slackware installation process. A floppy disc, usb stick are all good options. On a server with network connection can also be ok, if you know how to access it from the Slackware installation process.

Under the Slackware installation process, you'll pick all packages, and then you'll pick "tagpath". Use ctrl+alt+f2 if you need the command line to mount the floppy/usb stick or whatever to access your tagfiles.

Good luck!