kakoluri.com

Gypsy Chief Blog

kakoluri.com header image 2

Turning to Slackware – Turn 2

December 22nd, 2009 · 1 Comment · boinc, linux, thinkpad

Get Slack

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.

 

Posted by The GNUinator

Tags: ····

One Comment so far ↓

Leave a Comment