Slackware Linux Installation

This document shows briefly how to install Slackware Linux version 3.1 on a PC, starting from a CD-ROM. The minimum system you will need is a 386SX PC with 4MB RAM.

A 6-CD set containing several Linux distributions (Slackware, RedHat, GNU), plus images of the main Linux FTP sites, is available from Infomagic for around $25 + shipping.

Create boot and root disks

Since you have to start Linux from floppy disk before the installation can proceed, you need to create startup floppy disks. You can do this under DOS; here we assume your Slackware CD-ROM is accessible as drive D:
cd \bootdsks.144
rawrite bare.i a:
cd \rootdsks
rawrite color.gz a:
Note that there are a lot of boot disks to choose from in the \bootdsks.144 directory; type edit to view a file which describes them. bare.i is suitable for installation from an ATAPI/IDE CD-ROM to an IDE hard drive. If you have a non-IDE CD-ROM or wish to install to a SCSI hard drive, you will need to choose a different boot disk which has the relevant drivers built in.

Make space for a Linux partition

If you want to install Linux alongside your current operating system, you will need to run FIPS to make space for new partitions. This is not necessary if the machine will be dedicated to Linux and you don't mind erasing whatever is currently on the hard disk.

Boot up from the Linux disks

Insert the BOOT disk and reboot your computer. At the boot: prompt hit enter. The kernel will then load from the disk and try to find the hardware in your system.

You will then be asked to insert the ROOT disk. Do this and hit Enter. The root disk will be copied into RAM. You should get a slackware login: prompt.

Set up partitions

Login as 'root'. At the command prompt, type
fdisk /dev/hda
(for an IDE drive; if you have SCSI it may be /dev/sda for the first SCSI drive found, /dev/sdb for the second one etc). See the sample session for details of how to use fdisk.

Set up swap

If you have 8MB or more of RAM you can skip this step because the setup program can do this for you. But if you have less than 8MB, you must set up swap space by hand because otherwise the setup program won't have enough memory in which to run.

The commands to use are as follows, assuming /dev/hda3 is your swap partition:

mkswap /dev/hda3
swapon /dev/hda3
Type free to check that the swap space is active. Remember that when you install from setup, you can let the program select your swap space but when it asks you whether to use mkswap or swapon on that partition, you must say NO (because the swap space is already active and being used)

Install using 'setup'

Type setup and you will be taken into the setup system. Start by selecting the KEYMAP option (especially important if you don't have a US keyboard)


Choose a keyboard from the list, and then you will be given an option to test it. If you think it's the right one, enter "1" on a line of its own. You will then carry on to the next step.

Swap space

You will be asked if you wish to install the swap partition. Say yes. However if you have already enabled swapping (with mkswap and swapon), when asked whether the program should use mkswap or swapon, you must say NO. Otherwise, the program will erase the swap partition, which is already being used, and will very likely crash your machine.

Target partition

You will be asked which partition you wish to use as your root Linux filesystem, and if you have only created one Linux partition (apart from the swap partition) you will only have one to choose.

You will be asked how you wish to format it (safest is to select 'slow with bad block check') and how many inodes to create (use the default which is 1 inode per 4096 bytes).

If you have a DOS or Windows partition, you can choose to make it available from within Linux; to do so, you must give the name of a subdirectory which it will be mounted under, for example /windows. Then when you are in Linux you can copy files to or from your Windows partition as if they were Linux files, e.g.

more /windows/autoexec.bat
to view your AUTOEXEC.BAT file.

Source media

Next you will be prompted to select which source media you will use. Select CD-ROM. You will be asked to select the type (probably ATAPI/IDE) and then how it is connected. If it is on the same cable as your hard drive it is probably /dev/hdb; if it is on its own cable from a second IDE interface in your computer, it is probably /dev/hdc.


At this point you can choose which groups of packages (known as "disk sets" because originally people installed from bunches of floppy disks) to install. You have to install the A (base) set. Any other sets can be installed later if you like. However I recommend that you also install at least:
  AP  - extra applications
  D   - development tools (for compiling kernels etc)
  F   - Frequently Asked Questions and HOWTO documents
  N   - Networking software
At this point you can choose which method the system will use for prompting you for the individual packages to install. I prefer the "MENU" option because it offers the fastest install, as long as you know which packages you want. The "NORMAL" option will give you a more verbose description of each package as it goes along, making it easier to decide whether you want to install that package or not.

With the "MENU" option, certain recommended packages will already be selected. You can deselect them, or select other packages, by moving the cursor and hitting the space bar. You might wish to try the following:

In Slackware 3.1 before Jan 13th 1997, the kernel source (set K) is for version 2.0.0 which is very old, so you should leave this out. If you wish to build your own kernel, you can get the latest source and install that instead (2.0.29 at the time of writing)

After all of the disk sets have been installed, you will be prompted to choose a kernel. You should normally choose the kernel on the bootdisk you installed from (since it at least has the driver for your CD-ROM), in which case, you will be asked to reinsert the Boot disk. You can always build a new kernel later.

Configure your System

At this stage Linux will have been copied to your hard drive but there is some important configuration still to be done.

Finish off and reboot

You should now be back at the main setup menu. Select Exit and you will be returned to the Unix prompt. Reboot by typing "reboot" or pressing Ctrl-Alt-Del. The system will shut down and reboot; remember to remove the root floppy disk if it is still in the drive. It is very important to always shut down a Linux system properly, rather than just removing the power, because it needs an opportunity to write altered data blocks back to the hard drive.

When you see the LILO prompt you can hit ALT (if you chose to have a 5 or 30 second wait before booting the default O/S). This will then give you a "boot:" prompt. Hit TAB to get a list of operating systems; type the name of the one you wish to boot.

When you get your machine's login: prompt, login as root. The first thing you must do now is to set a root password (with the passwd command) and create a normal user account for yourself (with adduser)

Fixing bugs

There are some problems with Slackware 3.1 which you have to fix manually. This sort of problem is difficult to fix on an already-running Slackware; you would have to uninstall the package, get hold of an updated package, and reinstall again (which may delete your configuration files in the process). For this reason I strongly recommend Red Hat over Slackware, as its package management system is much, much better.

What to do in an emergency!

It is possible to modify your system in such a way that it hangs during bootup. For example, if you make a bad error in /etc/inittab, and then reboot, your machine could hang when INIT starts up; or if you change the shell for 'root' to a non-existent program, you won't be able to log in as root at all; or you might just forget the root password.

To help you with these problems, Slackware has a 'rescue' disk. This is made in the same way as the color.gz root disk:

cd \rootdsks
rawrite rescue.gz a:
You then boot up with an install boot disk as if you were installing Slackware, but use the rescue disk for the root disk. This boots up and you can mount your hard drive onto /mnt:
mount -t ext2 /dev/hda2 /mnt
You can then use vi on the system configuration files. For example, to fix a problem with the root account:
vi /mnt/etc/passwd
Edit the first line (for 'root') so that it looks like this:
then exit and save. Reboot with Ctrl-Alt-Del.

Last updated 4 Mar 1997