Title: Installing Slackware Linux 8.0
Author: Rajinder Yadav
Date: May 17, 2001

Revised: Dec 1, 2001

Home

This article will guide you step by step in your goals to get the GNU/Linux operating system installed and running on your PC, and provides helpful tips and informative background information. If you're looking for something more then the average installation tutorial, I suggest you read this.

We will choose to install Slackware Linux because it is by far the most reliable and stable distro(butions) out there! This article is broken into three major parts, i) system installation, ii) X-Window configuration, iii) and system customization. When you have completed these stages, you will have learned the following:

  1. How to do a partitioned install of Linux
  2. Install and configure X-Window
  3. Setup and test your network
  4. Build and customize your own kernel
  5. Keeping your system current

Getting Started
First you will need to get a copy of the Slackware Linux CD. If you have fast Internet connection at home, you may download the latest copy from http://www.slackware.com/ . It is encouraged that you first pick a mirror site nearest you. I have found that some of the mirror sites listed on the Slackware site are not well maintained or current, so I decided to list a few good ones I have found to be reliable.

ftp://download.sourceforge.net/pub/mirrors/slackware/ (USA)
ftp://carroll.cac.psu.edu/pub/linux/distributions/slackware (USA)
ftp://ftp.sunet.se/pub/Linux/distributions/slackware (Sweden)
ftp://linux.sarang.net/mirror/os/linux/distribution/slackware/ (Korea)
ftp://ftp.planetmirror.com/pub/slackware/ (Australia)
http://sunsite.cnlab-switch.ch/ftp/mirror/slackware/ (Switzerland)

If you choose to download and you have a CD-Burner then you can simply pull down an ISO image of the Slackware Installation CD (install.iso) and burn that. If you don't, then you will need to install off your hard drive. If you go this route, you will need about 640MB of free drive space to download all the packages. Also you will need get a set of three blank floppy disks. The space required to install an entire set of packages as of Slackware 8.0 is around 1GB (you will need additional disk space for your personal files).

Basic System Requirements
A PC with a 386 CPU(Pentium is recommended)
8Mb RAM (16 or greater is better)
1.5G of hard drive space
VGA graphics card (for X Window)
80M - 1G partition for Linux

To give you an idea of my laptop running Linux:

Where To Find Things
In case you get bewildered by the directory organization at the ftp sites, all the distors are found under the /slackware branch. There you will find slackware-8.0 or later, click on the directory to see all the files for that particular release. The ISO image is located under /isos (all you need is the install.iso), and the individuals packages are all located under /slakware.

Installation Options
Beside the CD-ROM, there are other options available on how Slackware can be installed, but only a few may apply to you. Slackware can be installed off a server over a LAN, files can be downloaded to a hard drive and installed from there.

If you will be installing using a CD, you can boot off it if your BIOS allowing booting from CD-ROM. If not, you will need to create a set of floppies to load a mini Linux kernel to get yourself boot-strapped.

Installing Off The Hard Drive
You can skip this section if you have a copy of the installation CD. To install from a hard drive, you will need about 680M of free space on your drive to download all the files. You will need to create a directory called "slakware", it is very important that you create this directory, otherwise the setup program will not be able to find the installation files you downloaded.

NOTE: because of MS DOS 8.3 filename convention, we are stuck with the directory name of "slakware" without the letter 'c'!

Making A Boot Disk
The files you need to pick up are located under /bootdsks.144 or /bootdsks.12, and /rootdsks, in order to make your boot disk, you will need three files: bare.i, color.gz and rawrite.exe

The boot image (bare.i) has a copy of LILO (the Linux Loader) and a "bare bones" Linux kernel, which has support for IDE/ATAPI CD-ROM drives, floppy support, ramdisk and basic network support for Ethernet cards. If you need SCSI drive support then try scsi.s (note this image wastes a lot of memory as it is a generic scsi enabled kernel image, try finding one for your specific drive if possible).

NOTE: all SCSI images end with a ".s" suffix, all IDE images end with a ".i". Make sure to take a look at the BOOTING.TXT files if you should encounter any problems, also the README.TXT files found within the boot and root directories should prove helpful.

FILES DESCRIPTION
bare.i Linux kernel, IDE support only
color.gz root filesystem, Setup utility
rawrite.exe Write's images to floppy

Now we can't simple copy these files to the floppy, they must be written track by track on a floppy disk using the rawrite.exe utility.

To make the images from DOS, first copy these three files into a subdirectory like "c:\tmp" on your hard drive. From there issue the following commands from the DOS console:

To create the boot disk, issues the command,

	rawrite.exe bare.i a:\

To make the root(filesystem) disk type,

	rawrite.exe color.gz a:\

What to do if the boot disk fails? This shouldn't happen, but if it does, try another kernel image (refer to the README.TXT file in the rootdsks directory).

(no_pci.i) can be use if PCI probing is locking your system
(no_kbd.i) some Celeron system reboot when the keyboard led is reset!

Booting Up
Make sure you have a partition or a spare drive set aside to install Linux on! Let's begin by inserting the boot disk we created into the floppy drive and restarting the computer. If all is well, the following message should great you at the top of your screen (if not try another kernel image as we mentioned in the last section).

	Welcome to Slackware Linux (v.8.0.0) bare.i bootdisk!

At the "boot:" prompt, hit the Enter key to continue the boot process. You should see the message, "Loading ramdisk....", wait for it to finish loading. If this step goes fine, you should see a slew of message being dumped to the screen as the Linux kernel probes your hardware. When you are requested to place the "root" disk, make the swap.

	VFS: Insert root floppy disk to be loaded into RAM disk and press Enter

If the root disk was located of the floopy disk, you will see the message, "RAMDISK: Compressed image found at block 0"

NOTE: The bootup diagnostic messages can be view later with the command "dmesg", or you can hold down the right shift key and use pageup/pagedown to navigate the message buffer while it's still displayed.

Log In As Root
When Linux has completed the boot process and mounted the filesystem, it will prompt you to enter a login id.

slackware login:

Type "root" and hit enter. This will give you administrative power to issue commands that normal users are restricted from.

NOTE: If you are prompted for a password, hit enter or try NULL.

You are now ready to begin installing the Linux OS on to your hard drive.

Organizing Your Disk Space
We are going to be installing Linux with a multiple partitions setup, but first we need to understand the filesystem layout before we go any further. Linux Slackware, follows the "Filesystem Hierarchy Standard". This directory structure was initiated in 1993 and was first made available in Feb of 1994. It began within the Linux community, but soon other commercial UNIX vendor joined. There was at that time a great need to bring order and organization to the OpenSource movement. The main items of concern were the directory structure and the placement of files within this structure. What came out of that is the FHS documented at http://www.pathname.com/fhs

For the most part you will need to decide how to partition the top level directories listed below. If you really don't want to bother, you can end up putting everything on a single partition, but I highly recommend against this practice.

                     /
                     |
  +--+---+----+---+--+--+---+---+---+
  |  |   |    |   |     |   |   |   |
 bin |  sbin  |  lib    |  root |  mnt
    / \      / \       / \     / \
   /   \    /   \     /   \   /   \
 dev  etc opt  home tmp  usr var  boot 

Most Linux installation should have at least three partitions, one for the operating system binaries, the other for the swap space, and another for user data. The benefit of this approach is a clean separation between program and data files. The nice things about partitions is they act as barrier which safeguard your data. For example, when you need to reinstall or upgrade Linux there is no worry about the user's data getting deleted or overwritten. This alone is a good enough reason to do a partition installation.

The top level '/' directory is called the root, and the directory with the label "/root" is where the root home is, otherwise known as the sys admin account. All other user accounts are placed under the "/home" branch, so a user named "yadav" would have a home directory under "/home/yadav".

If you're going to install the entire gamut of Slackware then be prepared to give up over 1G on the hard drive. The KDE and GNOME Desktop Managers take up a lot to space. If you're short on space, you might want to select installing one of them, and if you really don't need these two heavy-weight, there are more better and smaller alternative Windows Managers , like FVWM2 which I use.

Devices and Filenames
Linux is an OS that mounts devices onto the filesystem under /dev. You need to understand this before beginning a partition scheme on your hard drive. Be aware that all IDE/ATAPI drives are mounted as, /dev/hd? , where ? is a letter designating a (physical) drive. So each drive is labeled in the following manner:

	
	/dev/hda will point to the 1st primary IDE/ATAPI drive
	/dev/hdb will point to the 1st slave drive
	/dev/hdc will point to the 2nd primary drive
	/dev/hdd will point to the 2nd slave drive
	
	/dev/fd0 is the 1st floppy drive
	/dev/fd1 is the 2nd floppy drive

SCSI drives have the following naming convention.

	/dev/sda First SCSI drive
	/dev/sdb Second SCSI drive

Moreover, each drive will have one or more partitions, each partition is labeled by a number starting at one.

	/dev/hda1 is the 1st partition on drive 1
	/dev/hda2 is the 2nd partition on drive 1
	/dev/hdc5 is the 5th partition on drive 3

Partitioning
I will assume that Linux is going to be installed on the first drive. Thus to create a partition on it type,

	cfdisk
If you're going to place linux on a second drive (as in the case of a dual-boot system), then you have to call cfdisk like this,
	cfdisk /dev/hdb
Once the cfdisk program is running, use the menu to add and delete partitions to your requirements. First create a "swap" partition about twice the size of the RAM on your PC, make sure to set the "type" to swap using the menu. Following this, create a partition large enough to hold Linux, make sure to mark this partition as bootable using the menu. Finally use the remaining space to create a partition to hold user data. When you are done creating all the partitions, write the partition table to the drive using the menu and then exit for a reboot.

NOTE: If you're going to use a swap space, make it you're first partition, as this will increase disk access and swap read/write performance.

Below is a view of my partition on drive 1, you can use "fdisk -l" to list all your partitions.

	root@sandbox: fdisk -l

	Disk /dev/hdc: 15 heads, 63 sectors, 8930 cylinders
	Units = cylinders of 945 * 512 bytes

	   Device Boot    Start       End    Blocks   Id  System
	/dev/hdc1   *         1      6200   2929468+  83  Linux native
	/dev/hdc2          6201      6407     97807+  82  Linux swap
	/dev/hdc3          6408      8930   1192117+  83  Linux native

Notice how the 1st partition /dev/hdc1 is market (*) bootable and /dev/hdc2 has and ID values of 82 marking this partition as the swap space.

After you've rebooted and logged in as root, you can start to install Linux by typing setup . Follow the menu driven setup program by selecting the "Add Swap" option, this will take you through all the steps to get Linux installed on your system. Linux will detect the swap partition if it was marked and then will proceed to format and do a low-level surface scan for bad blocks. This can take a while so don't automatically assume the system is hung!

When the system has created a swap space, it will activate it and continue by asking you where the root filesystem is to be placed. Make sure to pick the bootable partition (i.e. /dev/hda2) so you can boot off it later.

Selecting Inode Density
Formatting the partition is required, selecting an inode size can be tricky for someone new. If you have a large hard drive(8 Gigs), you might be better off picking a value of 4096. If you pick a smaller size of 1024, then more inodes will be required that end up taking valuable space away.

NOTE:You can choose different inode density for different partition, this will not affect the way Linux works.

For example a 10G HD with a inode density of 1024 bytes will requires

    10G /1024 = 10*(1024^3) / 1024
              = 10485760 (# inodes required)
              = 10MB of space used for inodes

while a 10G HD with a inode density of 4096 bytes will requires

    10G /4096 = 10*(1024^3) / 4096
              = 2621440 (# inodes inodes required)
              = 2.5MB of space used for inodes

NOTE: If you have too few inodes, it is possible to run out of disk space even though there is plenty of space left over. How can this happen? Well if you have lots of small files this can end up happening easy. How many files with a sizeof 1024 bytes can you put on a 10G drive with a inode density of 4096? That would be 2621440 (after that we've run out of inodes!). Thus we're left with:
	10G - (2621440 x 1024) = 10G - 0.0244G = 9.98G of free unusable space
The other side of the coin means that a 10 byte file ends up claiming at least the inodes density size (1024 or 4096 bytes).

Selecting Packages
You will have to decide how you're going to use your Linux system. If you are like most people, you will want to use it as a desktop system, equipped with a nice desktop manager (of course). If you're a power user, you can opt out for a lighter window manger. If you're one of the few who's installing Linux to be used as a server, then you can get by with the base System series plus the network series.

Slackware is very nice in this respect, you can start of with the base Linux system, and can add the other packages later with the package management tools. If you're not the faint of heart, you can grab the latest source code of your favorite program and build it yourself to stay current.

Programs are divided into series under slackware,

Slackware Package Series
a1 Base Linux (required)
ap1 Non-GUI application(useful extensions)
d1 Development tools utilities, C\C++ compiler, gmake, gdb
e1 Emacs editor (optional)
f1 FAQs, How-Tos and help files(nice to have)
gtk1 GTK Library, GNOME Desktop and applications (GUI need X)
k1 Kernel source code (optional)
kde1 KDE Desktop and applications, QT Library (GUI needs X)
n1 Apache, network tools, mail news server, chat clients
t1 LaTex and typesetting utility(optional)
tcl1 Tcl script language (req. by GUI setup programs)
x1 X-Windows and XFree86 server(Req. by GUIs)
xap1 X-Window programs, Netscape browser, X-Window managers(GUI extensions)
xv1 XView graphics program(optional)
y1 Games that don't req. X(waste of space)

If you're going to want a GUI environment, with a network connection to the Internet for browsing, you can get by with the following series: a1, ap1, (gtk1 or kde1), n1, x1, xap1. You can also add the tcl1 toolkit series, which most GUI setup programs use, but non GUI setup programs are also provided, so in my view tcl1 series is a nice to have, but not a necessity!

If you want to have off-line help at your disposal, I highly recommend you select the f1 series. It has a lot of setup and configuration information available.

If you plan to pull down source code and do your own builds, or want to recompile the Linux kernel or just do some programming, then include the d1 development series into your installation plan.

If you don't plan on using any GUI stuff, and are interested in Linux for being a stand-alone server, then omit the following series: gtk1, kde1, tcl1, xap1, xv1

If you need to configure your kernel to add support for other devices and hardware, then add the k1 series, or download the latest source code from www.kernel.org

I don't like how the gtk1 series is packaged. They should have separated the gtk+ and glib files into their own series because you need them for many GNU UI programs, but you may not care for the GNOME desktop manager which requires a lot more space and system resources, as does KDE. If you are pressed for space, deselect all the packages in this series except for gktplus.tgz and glib.tgz. You can choose to ignore the gtk1 series altogether and build the latest and greatest of gkt+ and glib from source (I'll show you how to do this in the section on building GTK+ and GLIB from source).

NOTE: You can remove unwanted packages after the installation (when you get more familiar with Linux), but I don't recommend this if you are not 100% sure about not breaking other dependencies. If you remove something another program needs to run like gkt, then you can be asking for trouble.

When you've selected and installed all the packages, you will need to follow a few more step before rebooting in to your new Linux OS. Make sure to create a LILO bootdisk when asked by the setup program (have that 3rd blank floppy ready). You will need this in the event that you are unable to boot Linux off your hard drive, also this is an excellent emergency rescue disk, so don't skip this step. Don't worry about Installing LILO right now, we can do this after we get a Linux system installed and functioning.

NOTE: I've had problems getting LILO installed and working from the setup program. When I installed LILO to the master boot record (MBR) on my hard drive, I was unable to boot from my hard drive. I had to use the LILO bootdisk created in the setup process, and was able to fix this problem using the liloconfig utility in a pinch.

Configuring X-Window
This is probably the most frustrating part of Linux for a new comer, it can take many tries before X-Window is up and running. Before getting started, you should have an idea about a) what video card you have installed, b) the video ram available, c) monitor make and model, and d) the monitor's horizontal and vertical sync frequencies.

If you don't have a clue about what video card you're using, you can try to use the SuperProbe utility. It should give you an idea about the video chipset and video ram size. But don't take this information to be correct, rather use it to validate what your assumptions. The best option is to open up your pc and take a look at the label of the video card, get the name and model number. If you need more information, go to the manufacture's website!

If you want to play it safe, you can begin by selecting a vga card, then try a super vga card, or just select the virtual framebuffer driver. If you pick the wrong video driver, either the X server will not run or you will get a blank screen. So don't worry about picking the wrong card, you can always go back and pick a new one.

To get XFree86 to probe your hardware and generate a configuration file to get X-Window to start, type the following command at the prompt,

	XFree86 -configure

If this fails to get X-Windows to start, then you can try using the xfree86setup , which can be found in /usr/X11R6/bin directory.

NOTE: xfree86setup will need the Virtual Framebuffer package (xvfb.tgz), so make sure it is installed.

The other console menu driven utility that can be used to generate the XF86Config scritp file is xf86config . The generated XF86Config file will be placed in /etc/X11, you can later took a look at this file and edit it by hand as needed.

Once you have generate the XF86Config file, it time to run the X server and see if it workd, to do that just type startx . If there is a configuration error, the X server will report and error. What this mean is you selected the wrong video card, trying going through the step again and pick another card. If instead you get a blank screen, or the display looks unreadable, then you probably need to modify the video timing of your monitor. To kill the X server, hit the [CTRL]+[ALT]+[BACKSPACE] keys.

WARNING: Be careful when selecting your monitor's sync rates! If you have a old monitor or a cheap one, you can end up distroying it by over clocking it. If you end up picking a higher frequency than the monitor can handle, you will probably hear a high pitch noise coming from the monitor!!!

Setting the defaults
If you want to change the monitor sync rate, or modify the default video resolution and colour depth, you will need to edit the /etc/X11/XF86Config file.

To see what colour depth you're using look in the file under the "Screen Section" for the DefaultDepth field. In the example below we have a colour depth of 24-bits giving us a possible of 2^24 = 16777216 colours.

Section "Screen"
    Identifier  "Screen 1"
    Device      "Geforce 32M"
    Monitor     "kds"
    DefaultDepth 24

Other possible values are 8 and 16. Now each colour depth will have various resolution assigned to it. Look for the display section for your colour depth.

Subsection "Display"
    Depth       24
    Modes       "1600x1200" "1280x1024" "1024x768" "800x600"
    ViewPort    0 0
EndSubsection

Here we see the screen resolution defined by the "Modes" field. The first entry "1600x1200" will be the default screen size when X-Window starts. You can edit this line to modify your prefered screen resolution. Just make sure to edit the correct display section based on the Depth size.

To change the monitor sync rate, find the "Monitor" section, under there you will see, HorizSync and VertRefresh field that determine the sync frequencies. Use you monitor spec to edit this files. If you missed the previous warning, here it is again!

WARNING: Be careful when selecting your monitor's sync rates! If you have a old monitor or a cheap one, you can end up distroying it by over clocking it. If you end up picking a higher frequency than the monitor can handle, you will probably hear a high pitch noise coming from the monitor!!!

If you're still stuck and can't get X-Windows to work, take a look at the XFree86 Video Timings HOWTO

Home

Rajinder Yadav Copyright © 2001, All Rights Reserved

Hosted by www.Geocities.ws

1