Skip to content

Turning to Slackware

Get Slack

Installing Slackware Linux is a pretty straightforward proposition – I’ve done it on numerous computers, but preserving my data during a distribution change required some additional steps. The purpose of this series is to describe those steps. I switched from OpenSUSE 10.3 to Slackware 13.0. First, some background on the computer and its mission.

Several years ago I bought a ThinkPad T30 on eBay. This computer came with Microsoft Windows XP-Professional registered to “Valued Customer”.

I used GNU Parted to shrink the Windows partition, then installed Slackware Linux/GNU. The primary mission of the machine (Type 2367-3U9) is to process climate prediction models for climateprediction.net

At the time, Slackware was still running a 2.4 kernel as the default. I had so much trouble that I contacted Climate Prediction’s user support for help. They suggested that I try Red Hat or SuSE instead. I decided on SuSE.

The T30 did not come with a builtin wireless card. Several times I arrived downtown where there was wireless Internet only to discover that I had forgotton to pack a PCMCIA wireless card. Then I found a mini-pci wireless card that would stay with the computer. This card had started life as an Orinoco Silver card and had been eeprom-flashed to mimic a Gold Card. The Northern Colorado Linux Users Group had told me that a Gold Card was known to work with Linux. OpenSUSE recognized the card immediately. Windows-XP worked with it after I installed the software driver.

Years went by and I completed several climate prediction work units, each one takes months. Then the LCD display burned out after I had finished 85% of the latest work unit.

I found another T30 on eBay, machine type 2366-81U. This computer came with a different mini pci wireless card. I migrated my dual-boot hard drive to the new computer. OpenSUSE recognized the new wireless card immediately. Windows-XP barfed on it.

Recently I discovered that OpenSUSE 10.3 would no longer be supported. Novell prefers that you do not continue to run old versions. In the meantime, Slackware had switched to a 2.6 kernel and I was anxious to try the new 13.0 version.

Why Slackware?

Mention Slackware to any Linux person and you are likely to get one of two reactions. Oh, Slackware, yes, I used that [number of years] ago. Or, Slackware, don’t leave home without it. A recent review of version 13.0 says that this ‘under the radar’ distro maintains a very loyal following. The reviewer recommends Slackware only for advanced Linux users. I beg to differ, based on my experience with it. No one would ever confuse me with an advanced user. I was 54 when someone showed me how to turn a computer on. It was an Everex 286-12. Twelve meaning turbo. So much faster (compared to what?)

The most charitable thing you could call me is an advanced intermediate user. I think I’ve made every stupid mistake that could ever be made. And yet, I’ve stuck with Slackware for years. You should be comfortable at the shell prompt and you should enjoy editing configuration files with a text editor. I am and I do. This does not make me an advanced user. Right here I feel that I should acknowledge the debt I have to Shilo Bacca of Stockton, CA and others like Alien Bob on Linux Questions Slackware Forum. They have helped this intermediate user run Slack.

Our series focus is moving user data from OpenSUSE to Slackware on a computer whose primary mission is to run Climate Prediction work units. Climate prediction is the most ambitious climate science computer simulation model ever attempted. I planned for the migration by running the current work unit in OpenSUSE i.e. the old hard drive in the new computer – until it was finished. This was the perfect time to freeze the content of the BOINC/ directory. Once the work unit was done I made a tar file of the entire BOINC/ directory and moved it to a thumb drive. Then I prepared the new hard drive for the Slackware 13.0 installation. The first step is to decide on a partition scheme. I opted to go for a dual-boot setup where I could decide on Slackware or Windows. Again I used GNUParted to shrink the existing C:\> drive. Then I booted to the Slackware installation CD. Slack’s installation routine continues to be text based as always. I made new partitions for root, home and linux swap.

I don’t need to describe the actual installation in much detail. I deselected disk set [E] Emacs as I’m not that much of a religious person. I made sure that the [Y] disk set was selected since I like GNU Fortune. The best advice seems to be to install all software packages without prompting. That way you don’t get into dependency heck the way you might with an RPM-based distro like Fedora or SUSE.

Soon after all packages are installed you are asked what time zone you are in and whether your computer clock is set to local time or UTC. The scheme I follow is to set my clock to local time if I have a dual boot with Microsoft, otherwise I set the clock to UTC.

How to Tell Time

First, here’s how not to tell time. I had Ubuntu Breezy Badger on a computer one time when I was on dialup Internet. I would start Ubuntu and get an error message every time since an NTP server could not be found. Of course the time server couldn’t be found – there was no Internet connection. That’s one of the reasons I decided Ubuntu wasn’t for me.

Here’s what I do – courtesy of Vector Linux user forum. As root

touch /usr/sbin/setmytime
chmod +x /usr/sbin/setmytime
#! /bin/sh
ntpdate us.pool.ntp.org && hwclock --systohc
# end /usr/sbin/setmytime

Next, I edit /etc/fstab so that regular users can mount CD Roms, floppy disks, and travel drives. As root I make a directory for travel drives;
mkdir /media/travel
and I use mcedit or vi to edit fstab. I change owner to user in the lines which set up mount points for CD drives, floppies, and travel drives. This may not be strictly necessary as I use the up arrow to add a regular user to audio, video, plugdev, etc. groups in addition to their being in the users group. If the computer will be used by only one non-root user I add that user to the wheel group. Once I save /etc/fstab and exit mcedit (for example) I can mount a travel drive. One additional package I want to install is slackupdate from darklinux Slackware 13.0 has changed to a .txz format from the previous .tgz for packages. In order for slackupdate to work properly you need to install Slackupdate as a package. This gives you version [0.7.1] in /usr/bin. Once you have that package in place you need to overwrite /usr/bin/slackupdate.sh with version [0.7.3] which works with the new package compression scheme.

My next step is to install the software which lives in /usr/local. There are two. One is insult. Insult is an old UNIX program originally written in Perl. It returns an insult derived from words in Shakespeare plays. You get an adjective, an adverb, and a noun. One from column A, one from B and one from C all selected at random. I found this as an OS/2 program with C source. I ran the EMX OS/2 port of the GCC C compiler to make an OS/2 executable. When I started using Linux more often I tried to compile this OS/2 C source on Linux. It worked as soon as I removed carriage returns and line feeds. So I unzip the C source in /usr/local/src and as root

gcc -o insult insult.c

then move insult ../bin

If insult compiles I know that gcc is working. Also, insult reminds me that computers do not generate random numbers – they generate psuedo random numbers. The early work on PRNG, psuedo random number generators, was done at the University of Illinois at Urbana – Champaign Center for Supercomputing and that material is still available in the archive. insult also reminds me of the limitations of the random function in the standard C library. The standard function is described as a linear congruence generator with a period which is inadequate for serious purposes. You wouldn’t generate winning state lottery numbers with the standard C library random function – and yet using the Mersenne Twister, a lagged fibonacci generator, in the insult C source would definitely be overkill.

The second program which lives in /usr/local is scimark2. This program comes from NIST – the National Institute of Standards and Technology i.e. the feds. Should you call this a benchmarking program? A BenchmarkingHOWTO I read said not to. Both OpenBSD and FreeBSD have scimark2 stubs in their /usr/ports/benchmarking directories so you pays your money and you takes your choice. Scimark2 was released as Java source with C source as a backup just in case the Java source wouldn’t compile. I tried this first on OS/2 but I never figured out what was wrong with OS/2’s classpath environment variable so I abandoned Java efforts and made an OS/2 executible with the EMX / GCC compiler against C source. I also used Borland’s free command line C/C++ compiler to make a Windows 32 bit executible. Today, in Linux I install C source to /usr/local/src and run make. Again, this moves to ../bin

Once these programs are in place I like to run updatedb as root. This updates the slocate database. Some people think this is a security risk. I’m glad to know that but your database is going to get updated anyway unless you change the tasks in /etc/cron.daily.

At this time I also run last. Several distributions had this turned off on the grounds that it was a potential security threat. If last is turned off it is really easy to turn it on
touch /var/log/wtmp
There is a book called “Hardening Linux” which says that last can actually help you detect intruders. Slackware has last turned on as the default.

Chapter 2

This is installment two of my series on Slackware version 13.0. In chapter one I described how I installed Slackware 13.0 on a computer whose primary mission is to run Climate Prediction work units. At this point all of the Slackware packages are in place, I have added slackupdate and I have added two programs to /usr/local.

A root password has been selected. LILO has been installed and the computer has been rebooted once. The kernel at this point is huge-smp. More about this later. Just remember that the operating system needs to know that module dependencies are up to date. That is why that first reboot using the huge-smp kernel is so important. Notice also that no regular user has been created. I’m doing all of this initial system administration as root. I have not connected the computer to the Internet. All of the extra packages and programs have been installed from a travel drive or some other local source.

Network Setup

One of the last steps in Slackware installation is network setup. This is optional. You can always do it later using netconfig. I prefer to do it at the end of the installation since I am going to make some modifications to /etc and I prefer that they not be overwritten.

At this point, the installation routine assumes you want to setup network computing through an ethernet interface. Your choices are static address, DHCP, and loopback. I usually want a static address for my ethernet connection. I know that administering a bunch of static addresses can be a nightmare, so I have automated the process. I use a file called /etc/hosts.localnet. I keep this on a travel drive and update it to reflect each computer name, nickname, network address i.e. Class C hobby network address, and a description of the computer and what operating system it runs.

Changes in /etc directory

I change /etc/hosts.deny to read ALL: ALL. I change /etc/hosts.allow to read ALL: [network address of localnet]. I use a custom /etc/dhclient.conf given to me by a friend at Northern Colorado leading Linux consultants . Strictly speaking you do not need a custom dhclient.conf – but I found out the hard way that dhcpd needs an argument. I had a computer which just would not connect the Internet at the wireless cafe no matter how many times I tried. The reason was that dhcpcd was trying to get an address for an ethernet connection. The fix is to type iwconfig. You should be able to determine the name of your wireless interface. It could be wlan0, or eth1, or ath0. I used the wireless interface name as an argument for dhcpcd. End of problem. Note that the dhcp package in Slackware 13.0 will prompt you for an interface name if you do not supply one.

I use a hosts file which has evolved with Windows users in mind. But it works in real operating systems too. Your network setup should say order hosts, bind so when a connection is requested the client looks in the hosts file first for address resolution. So every host which has doubleclick in its name has a network address of 127.0.0.1 so that the remote host cannot find it. I miss a lot of banner ads and harmful junk that way. Click on the above link for more details. I download hosts.zip, unzip it, delete all the Windows stuff and convert HOSTS to UNIX text. This is not strictly necessary but this file comes out of the Windows world – i.e. it is DOS text with carriage returns and line feeds. I like to change this to UNIX text with a tiny shell script I call dos2linux.sh which lives in /usr/bin. To setup my /etc/hosts file I cp /etc/hosts.localnet /etc/hosts and then cat HOSTS.fixed >> /etc/hosts and then edit /etc/hosts to take out duplicate refereneces to localhost.

In the next chapter I’m going to talk about moving user data from one Linux distribution to another i.e. from OpenSUSE 10.3 to Slackware 13.0. But first here is what not to do. I changed from Vector Linux, a Slackware offshoot, to ‘uncle’ Slackware without formatting the /home partition. Vector Linux was running IceWM as its window manager. IceWM wasn’t one of the choices in Slackware. At the time I wasn’t familiar with slackbuilds.org Bottom line; the X desktop was a mess. I hope someone will learn from my mistakes.

I end this chapter by saying why I think Slackware is superior for wireless networking at coffee shops or the public library, i.e. unencrypted wireless connections.

Why Slackware is Better

Get within range of a wireless ‘hot spot’ and OpenSUSE or Ubuntu will connect to it, just like Windows will. In Slackware you have to take an extra step, you have to start dhcpcd. I think this gives me more control as I can easily specify which unencrypted network I wish to connect to. Open wireless hotspots are not an unmixed blessing. Some of the bad guys set up open networks with names similar to your favorite coffee shop. Their goal is to get you to connect to them by mistake so they can conduct man-in-the-middle attacks.

Chapter 3

This is installment three of my series on Slackware version 13.0. In chapter one I described how I installed Slackware 13.0 on a computer whose primary mission is to run Climate Prediction work units.

In chapter two network setup and changes to /etc were covered along with my reason for preferring the additional step – starting dhcpcd explicitly – before connecting to the Internet.

In this chapter I’m going to talk about moving user data from one Linux distribution to another i.e. from OpenSUSE 10.3 to Slackware 13.0. I believe that Slackware is an appropriate choice not only for advanced users but also for intermediate users who are willing to study and follow instructions. Before creating the normal user(s) there is still a bit of system administration to do. One project is to switch from the huge-smp kernel to a generic-smp kernel. Another task is to make changes to LILO configuration. If you have been reading this series from the beginning, you know that I have made every dumb mistake that could be imagined. So, here is another one – a dumb mistake – which is making more than one change to LILO configuration at a time. Please do not do that.

Starting with Slackware version 12.2 a default boot logo ships with the distribution. The /etc/lilo.conf file is self documenting on this.

You already know of the debt I have with Shilo Bacca of Stockton, CA. Shilo was a leader on the Slackware forum at Linux Questions Dot Org. He documented how to add a boot logo to LILO and gave some sources where the user could get a Linux Bmp to use. So, I’ve been using a LILO graphic boot logo for years. I find that whatever LILO troubles I have had were caused by my trying to make more than one significant change in /etc/lilo.conf at one time instead of making each change seperately then rebooting to make sure that the system still works as expected.

Whenever I do a Slackware installation I’m running the huge-smp kernel when the installation finishes. As documented in the mkinitrd-README that kernel is not really the best choice for daily use. But you have to make an initial ram disk in order to switch to another kernel. I use the mkinitrd_command_generator.sh which produces the arguments for mkinitrd

Let’s say that the suggested mkinitrd arguements are like this

mkinitrd -c -k 2.6.29,6-smp -m mod:mod:mod -f ext3 -r /dev/hda1

but you forget to put the slash before dev so it looks like dev/hda1 instead of /dev/hda1

What result? A kernel panic on the next boot. I did this one time. Bottom line avoid typographical errors in code.

Chapter 4

This is the fourth installment of our Turning to Slackware 13.0 series.

By now all the Slackware packages have been installed, changes have been made to the /etc directory and to /usr/local. We have a boot logo for Slackware plus any other operating system (Windows for example) which would be controlled by LILO

We have turned from the default huge-smp kernel to something more appropriate; generic-smp kernel for example.

Now it is time to create one (or more) regular user(s) and restore data from the user’s /home directory. Simply installing Slackware, not formatting the /home partition and then recreating the user can work if you are upgrading from one version of Slackware to another. That strategy is guaranteed not to work if you are changing from one distribution OpenSuSE to another Slackware for example. I found out the hard way. You do not want the dot files from the old installation. There is one exception to this. I do want to preserve my Firefox setup so that I have all the bookmarks and preferences intact. Mozilla has documented how to do this in Linux. What I do is to make a tar of the entire .mozilla/ directory.

tar -cvf moz.tar .mozilla/

I make tar files of all the documents, images, other data that I wish to migrate to the new installation. I save all of these to a travel drive. Once the new Slackware installation is done and basic system administration has been performed then it is time to create a regular non-root user. After that I restore all the data and the Firefox setup to the new installation.

One of the first things I want to do as a non-root user is to change the Bash prompt. You do this by changing the value of the PS1 variable. In order to preserve this variable across reboots you can save this to ~/.bash_profile Here is my setup.

export PS1='\[\033[1;36m\]\h:/\w\[\033[0;39m\]\n\u:\$ '

Another user administration job is to install the appropriate Adobe Flashplayer. I log on to the Adobe website and download the Flashplayer for Linux. Adobe offers this in different flavors; for example as an .rpm for distributions such as OpenSuSE or Fedora. What I want is the .tar.gz version. Then I su to become root and untar the libflashplayer.so into /usr/lib/mozilla/plugins directory. You can test to make sure the installation was successful. startx to bring up your desktop. Start Firefox and when that comes up type about:plugins into the browser address bar. Note that there are no spaces around the colon. You should get a page listing all installed plugins; including the Flashplayer. Like it or not some websites will not load unless a Flashplayer is detected.

I personally like the idea that Slackware boots into runlevel 3, a shell prompt in multiuser mode. If you would rather have Slackware boot into a GUI Login you can, as root, edit /etc/inittab and change from id:3:initdefault to id:4:initdefault. I would never do this. In case there is something wrong with the X Server you could be left with an unbootable system.

This brings me to another reason I run Slackware in preference to any other Linux distribution. Slackware is ‘old school’ Linux and is a first cousin to operating systems like FreeBSD and OpenBSD. You are not going to be asked if you are sure you want to take these actions. You have the freedom to mess up pretty badly and to learn from your mistakes. I certainly have. That is why I think Caitlyn Martin is dead wrong when she says that Slackware is only for experienced advanced users. Perhaps I will say more about this later. Meanwhile, I have Slackware 13.0 up and running, I can log in as a regular user, I have uploaded the completed Climate Prediction work unit and downloaded a new work unit to process. What window manager do I want to use when I am running X? This can be set at the individual user level. Choices include KDE and xfce plus others. These window managers are on a menu you get by invoking xwmconfig. But what if I decide I like the IceWM better? That is the subject of the next chapter.

 

Posted by the GNUinator