Advanced

Slackware - from first boot to usable desktop.

Posted by salparadise on · 13 comments
LXer; By salparadise
Mail this story
Print this story

 LXer Feature: 19-May-06

There's a saying, "use Debian - learn Debian - use Slackware - learn Linux". You might want to take that with a tiny pinch of salt. There's a grain of truth in there but it's not quite as straight forward as it first appears.

This is by no means an exhaustive lesson in slackware, just some steps to get you to to a place where you can get things done.

My slackware system is 10.2 running KDE 3.5.2 and FreeRock Gnome 2.12-1 with various extras added.
This tutorial supposes you know how to use vi/nano/pico and also presupposes you're using a standard IDE system. If you're on a SATA system then use the sata.i kernel and stick to the 2.4 version. I'll try and put together something that covers SATA disks and re-ordering the rc.modules at another time (once I've learned how myself). If you don't know how to use vi then ask me and I'll put together a short "how to survive on the command line with vi" tutorial.

If you're new to slackware then I would suggest you either use a spare hard drive/partition or a spare computer as Slackware doesn't automatically add other OS's (apart from Windows) and I'd hate you to go and screw your computer up trying this out. Slackware also doesn't have a partitioner like the Debian/RPM based distros, you need to know how to use cfdisk. If this is beyond you, you can always partition the hard drive using a more friendly setup routine where a graphic partitioner is offered, such as Mandriva, SuSE, Fedora et al. Just use Ctrl Alt Backspace followed by Ctrl Alt Del to force the installer to stop and the machine to reboot after the partitions are written and before the packages are selected.

So, you've installed Slackware. You chose "install everything (recommended)" and you've made it through the installer section and got to the end of the process. You reboot and are taken to a login prompt. What next?
How do you turn this install into a usable system? It's actually a lot easier than you think.

First up, login as root. You have to login as root because the slackware installer doesn't ask for a user account to be set up. First, we need to edit /etc/inittab. Open it in whichever editor you prefer. Look for the line that looks like this
# Default runlevel. (Do not set to 0 or 6)
id:3:initdefault:

Change the 3 to a 4. This changes the default run level from 3 to 4 and means that X will start automatically when you next boot.

In the same file look for the following section.

# These are the standard console login getties in multiuser mode:
c1:1235:respawn:/sbin/agetty 38400 tty1 linux
c2:1235:respawn:/sbin/agetty 38400 tty2 linux
c3:1235:respawn:/sbin/agetty 38400 tty3 linux
c4:1235:respawn:/sbin/agetty 38400 tty4 linux
c5:1235:respawn:/sbin/agetty 38400 tty5 linux
c6:12345:respawn:/sbin/agetty 38400 tty6 Linux


Add the number 4 into the 1235 sequence. This adds the ability to use the Ctrl Alt Fx keyboard sequence to switch tty's whilst X is running.

Save inittab and exit.

Next, we need to set up xorg. Type /usr/X11R6/bin/xorgconfig and press Enter. Work your way through each screen entering the settings appropriate for your system. If you screw a setting up, don't worry, you can always rerun the command again.

Next, we need to tinker with /etc/fstab. Find the line that refers to the cdrom drive and in the options add the following. "user".
Example. This is the default cdrom line from fstab.

dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0

And this is the line after the change is applied.

dev/cdrom /mnt/cdrom auto noauto,owner,user,ro 0 0

Adding user to the options means you don't have to su to root and mount the drive explicitly each time you want to use a cd.

OK, kernel time. Slackware uses the 2.4 kernel by default. However, the 2.6 kernel is on CD 2. So, put disk 2 in, mount it, and cd into /mnt/cdrom/linux-2.6.13 and type installpkg *tgz. Once this has finished we MUST edit lilo.conf.
Add the following to /etc/lilo.conf

image = /boot/vmlinuz-generic-2.6.13
root = /dev/hdax
label = Linux-26
read-only


Change the /dev/hdax to the appropriate hda number for your root partition. Once you've done this, saved and exited, type lilo on it's own to get lilo to reread it's conf file. If you don't do this lilo will not work and you won't be able to boot into any kernel. (If you do forget this, boot the system from cd1 and follow the on-screen instructions "in a pinch you can boot your system by typing the following..." and then type lilo once the system is up and running.

OK, we're nearly there now. We just need to set up a user. Type adduser xxxx (where xxxx is your chosen username). Press Enter. Adduser will now take you through all the necessary steps to make the user account ready to go. Once you've done this type reboot and choose the 2.6 kernel.

Slackware should now boot into kdm and allow you to login to KDE (providing you chose KDE as default desktop during the install process).

Once you've started KDE up, find the kuser menu entry, or fire it up from the command line as root, and go to your user and click on Edit and then go to Groups and make sure you are in the cdrom group as well as the audio, video, games, disk and floppy (if necessary). Log out and back in again. You should now be able to use the cdrom drive as user.

Congratulations - you just set slackware up.

You can now add other bits such as Freerock Gnome or Dropline Gnome - both are built solely for slackware. I can recommend both, particularly freerock gnome - cus I know one of the developers.
http://gsb.freerock.org/ FRGnome can be installed via slapt-get or via a net installer or by downloading the iso and either burning it to cd or by mounting the iso thus. (Slapt-get is available from both linuxpackages.net and slacky.it. See below).

Download the iso and md5 sum file: FRG ISO, then check the iso; $ md5sum -c file.iso.md5

mount the iso; # mkdir /mnt/iso # mount -t iso9660 file.iso /mnt/iso -o loop # cd /mnt/iso

Then run either; # ./frg_install.sh

or manually use; # upgradepkg --install-new

Two great sources for slackware packages are http://www.linuxpackages.net and http://www.slacky.it. Slacky.it is an italian site and as far as I am aware doesn't have an english version. However, the site is easy to use (search facility is in the upper left corner of the page) and has the added advantage that it lists dependencies for each package searched for. For packages like mplayer this is really useful. I don't speak Italian but I use this site more or less daily and have no problem at all finding what I want.
If you do add Gnome you might find the menus are all messed up with huge lists of applications with missing icons. There's a great little package here that sorts this out. http://www.kde-look.org/content/show.php?content=31028 Download and install (installpkg name.tgz) this and it will separate the Gnome and KDE menus and put the Gnome menu under it's own single menu entry. Then, open a terminal and type kmenuedit and go through the KDE menus and remove all the unwanted Gnome entries. (KDE 3.5.2 is also readily available for slackware - install it using the upgradepkg command).

Your system should now be ready to go.



Extra: As pointed out by grouch, it might be better to run the xorgconfig section before editing inittab. Once you've run xorgconfig, type "startx" to see if x starts correctly. If it does, then edit inittab as instructed above. If you edit inittab and the xorgconfg is wrong, you'll end up with a messed up system and no graphics.

  Nav
» Read more about: Story Type: Tutorial; Groups: Community, Slackware

» Get new stories by e-mail: nightly or as they are published

« Return to the newswire homepage

  Related stories
» More like this

Comments (13)

Hmmm.

Not sure why this shows up as written and posted by me. I put it in Pending, checked to make sure it was there, closed the browser and went off for an hour or so . When I came back it was posted and credited to me alone. This makes it look like I crashed in, bypassed the editors and made it all my own. This was NOT my intention.

Just wanted to make that clear.
Sal,

You were named as the author in the Author field when I posted it from Pending. You should be able to correct it - assuming you see the "manage" link. I should have check with you before posting it. Sorry about that.
Don, you don't need to apologise. I just didn't want to come across as some self promoting ego-maniac. It was written by me, just not posted by me.

Oh! Well, we all know what an ego-maniac you are, so it's perfectly o.k. :-D

Just kidding. I know I felt that way at first. I believe I said so in the Editor's forum. You know though, I'm now to the point where I figure it's our job, as editors, to post articles. That's what we do. Maybe it's because I have had to post some of my own articles. I remember how to change the posting editor - I just never have.

I would think you were self-promoting if your lead text ran along the lines of, "Yo, check out my awesome Slack article, man!" But an editor's article posted by that editor shouldn't be construed as egotistical. If that's just not you, I'll try to remember that for next time. Is that cool?
Dat's wight wabbit!

Cool as a jewel.
salparadise:

I did it, but you don't know where I live.

IIRC, 'future' was running low and something needed to go out. Your name jumped out at me in 'pending', so I popped it over to 'future' without editing.

There was no way I was going to (a) edit that entry and (b) have my name show up on your story. That would take more brass than I could lift.

But, you got the culprit, alright. Don turned me loose with all that power and not a single attack dog in sight.

Sorry about pushing it out before you were ready.
I was ready, I just thought I'd gone mad and published it then had some sort of memory wiping episode.

Hey, I thought I was the only one left awake on the planet.

dcparris seems to have suffered a memory wipe episode, too. He and I were both working 'future' at one time. It made for some interesting re-sorts.

good article... slack rules

It's good to see some attention for Slackware on the desktop. It can be a little intimidating to configure, but you learn so much about Linux in the process. I also like Slackware's simple init process and text-based configuration. I ran Slack with KDE as my desktop OS for a couple years, but I have since moved on to Arch Linux. It follows the same philosophy as slack (simplicity), but adds an excellent package manager called pacman with a large repository. Arch is very bleeding edge so it may not be the best server choice, but I have found it to be a bit nicer than Slack for the desktop.

-j0shy81

Hmph! Crazy Slackers

>' There's a saying, "use Debian - learn Debian - use Slackware - learn Linux".'

There's an older saying: "Slackware -- not so much a distribution as a snapshot of somebody's hard drive." Things have changed a lot since that was coined. I'll always have a soft spot (heart? head?) for Slackware. It was the first distribution I managed to get to boot and I stayed with it until the version jump to 7. (Volkerding explained the necessity of that jump; it wasn't the reason I moved off Slackware. I just wanted to look around).

>"Change the 3 to a 4. This changes the default run level from 3 to 4 and means that X will start automatically when you next boot."

I disagree with this. A misconfigured X can cause a newbie to panic. Having to type 'startx' for a while will just seem quaint to them but gives them less terror when they get bold enough to fiddle with the configuration for X.

Quoting: I disagree with this. A misconfigured X can cause a newbie to panic. Having to type 'startx' for a while will just seem quaint to them but gives them less terror when they get bold enough to fiddle with the configuration for X.


Agreed. I was using this method for a while until a serious slackware user saw me doing it and I got told off for having bad habits and was shown how to edit inittab. As long as xorgconfig is used correctly, setting inittab to runlevel 4 is quite safe. The statement "as long as xorgconfig is used correctly" is the troublesome bit. You are probably right to urge caution on this one.
I added a section to the end pointing out your observation.

Thanks.

Post a comment

A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.

Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help

Sign up and post (it is free)  or  Log in and post