Slackware - from first boot to usable desktop.

Posted by salparadise on May 19, 2006 11:31 AM EDT
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

« Return to the newswire homepage

Subject Topic Starter Replies Views Last Post
Hmph! Crazy Slackers grouch 2 2,508 May 20, 2006 12:22 AM
Hmmm. salparadise 8 2,449 May 19, 2006 10:50 PM
good article... slack rules j0shy81 0 2,656 May 19, 2006 4:03 PM

You cannot post until you login.