One of the reasons Slackware isn’t for the casual user is that it frequently requires some hands-on configuration in order for it to do what the user wants. People installing it for the first time are usually shocked when they reboot the system and find themselves dropped to a command prompt. No GUI, no KDE, no GNOME – just a black screen with a command prompt showing the default host name “darkstar.”
I’m going to discuss a couple of things I did during this installation that might be helpful for others perhaps trying Slackware out for the first time. Some of these things are a bit new to me, too, so this will serve as my notes for the next time I have to do this.
For the record, this is all being done on a Hewlett-Packard Pavilion DV6000 laptop. The system has 2 GB RAM, an Intel Core Duo processor (1.84Ghz), 120 GB hard disk (user replaced), a 15.4″ WXGA screen, and an Intel chipset for video, Ethernet, wireless and sound.
Pre-Install Setup: This laptop is the frequent subject of my Linux experiments, so I have multiple partitions available for operating system installations. Currently, the drive is cut into three 20 GB system partitions, one 4 GB swap partition, one 15 GB partition for “home” directories, and a 35 GB partition for general storage. In addition, I have a small boot partition that stores the GRUB boot loader. That partition is mounted by all my systems, and it’s where GRUB executable and configuration files are installed. Essentially, the system boots that tiny partition, and it’s from there that I select the system I wish to run. I intentionally set this up this way, in order to have complete control over the boot process.
I added this partition to the mount table during the Slackware installation, so it would be available immediately once I had everything in place. All that’s required is to go to that mount and edit the menu.lst file to add the new Slackware partition to the menu.
Installation: after booting the Slackware CD, I just let it rip, pretty much. I formatted the installation partition, selected the other partitions to mount, and told it to just install everything. Twenty minutes later, file unpacking was complete and the installer script paused for me to do the basic system configuration.
I did something different time: I skipped configuring networking. I was not plugged into an Ethernet network, and I knew that using the wireless adapter out-of-the-box was probably not in play. The last time I did a Slackware install, I learned about a terrific tool called wicd, a network manager for Linux that makes connecting really easy. The tool is included on the Slackware CD/DVD in the “extra” directory. The user has the choice of using the default networking tools or adding wicd to assist after the fact. The wicd README file on the DVD offers the following suggestion:
Results have varied, but you will probably need/want to remove any references to interfaces from /etc/rc.d/rc.inet1.conf – in other words, make that file look as if netconfig has never been run.
“/etc/rc.d/rc.inet1.conf” references the Slackware configuration file that holds all the information about the system’s network interfaces. This file is usually configured by hand or by using the Slackware netconfig tool. The tool tries to detect the network adapters and add the correct entries in the file. Those experienced with Slackware know that while this works very well with Ethernet adapters, wireless configuration can be…to put it kindly…tricky. Since wicd is supposed to ease this burden, I decided to not do a network configuration during the install. This would leave the network rc.inet1.conf file alone, allowing wicd to figure everything out.
Another thing I didn’t configure during the post-file-install session was lilo. Since I use grub (in the screwy way I mentioned above), there’s no need for me to install a boot loader with Slackware. Slackware wants to use lilo by default, and this is probably fine for most people doing a single install on a bare drive. Grub is available for Slackware, and like wicd, a package can be found in the “extra” directory on the install media. Having used grub for a long time, I find it far more flexible. YMMV. Nevertheless, it’s a moot point here. I’ll just edit my current GRUB config file when I’m done.
Once the basic installation was finished, I rebooted, logged into my Kubuntu Hardy setup and edited the grub menu.lst file to add the Slackware partition. Then I rebooted to see if Slack would work. As expected, it came right up and dropped me right to the “darkstar” command prompt.
The first thing I wanted to do was see how a GUI looked and whether the video would need any tweaking (which I was certain it would). I logged in as root (no personal account yet) and entered the “startx” command at the prompt, which loads the default GUI. In a moment I was looking at the KDE 3.5 desktop. The video was set to 1024×768 (the laptop does 1280×800 max by default). That was also my only option when I looked at the Display configuration tool in the KDE Control Center.
Luckily, Slackware makes this pretty easy to fix, at least on laptops.
Back in the “old” days of Linux before all things were auto-configured, you had to get your mitts dirty editing the X Windows configuration file. You frequently had to dig into the specifications for your monitor or video card to get things like the vertical and horizontal refresh rates correct. This was critical; entering values that were out of your monitor’s range could damage it forever.
Today, especially with LCD screens, most monitors work on a specific set of standards regarding resolution and refresh rates. Most Linux distros can not only detect the video hardware in the system properly, but they can usually figure out how to get the display rigged up properly with a simple hardware poll.
Slackware has a tool for this called xorgconfig. If the video on your system is mangled up or not utilizing the available resolutions, shutting down X and running the command as root from a terminal will very likely make things right. The tool won’t figure out compositioning or any of the fancy eye candy you get on other distros. This is Slack…you’ll have to roll your own. But when I ran xorgconfig and restarted X, the resolution was just what it should have been, a nice clean 1280×800.
Now, to get the system to load the GUI up at startup, you need to edit one file. As root, you have to open the file /etc/inittab, and look for these lines right near the beginning:
# Default runlevel. (Do not set to 0 or 6)
id:3:initdefault:
This means that Slackware is running in multiuser mode with no GUI. To make the default GUI start, the “3″ has to be changed to a “4″. I normally add the entire line with a “4″ and comment out the other line, like this:
# Default runlevel. (Do not set to 0 or 6)
#id:3:initdefault:
id:4:initdefault:
This allows me to drop back to a command-line init whenever I want by just changing one character. Once I rebooted, the system came up, displayed the login manager and after logging in, I was at the KDE desktop.
The next thing I needed to get running was wireless on the network card. That’s coming up in the next post.