Slackware Install Guide¶
Introduction¶
This article will describe the process of installing Slackware Linux. Explanations and tips are given for the new user. It is assumed that if you are experienced with Linux you will know where your installation will diverge from this guide. ISO images of the install CDs are available from the Slackware web site.
This revision of the original article will use the official Slackware 12 DVD, downloaded via bittorrent.
Booting up¶
When greeted with the boot: prompt, you will probably just want to press enter and use the default hugesmp.s kernel. If you do not have a multi-processor or multi-core system you can choose huge.s. The only other kernel choice on the DVD is speakup.s, which contains a speech synthesizer.
Older versions of Slackware contained various kernels such as bare.i and sata.i, but this is no longer the case.
After selecting a kernel, the boot process will give the prompt below and allow you to change your keyboard layout. Press enter to get a standard English keyboard.
Enter 1 to select a keyboard map:
Once fully booted, a login prompt will be presented.
slackware login:
Log in with the username root. No password is required. Once
logged in you will see the console prompt.
root@slackware:/#
Disk Partitioning¶
NOTE: YOU SHOULD BACK UP ANY CRITICAL DATA ON YOUR DISKS BEFORE PERFORMING ANY DISK PARTITIONING OPERATIONS.
Most users will want to partition their first IDE drive, /dev/hda. Others may be using SATA hard drives and will need to partition /dev/sda. Use dmesg to help you figure out which device your disk is. Pipe the output using dmesg | more to allow you to see all of the kernel messages, or search the messages with dmesg | grep hd and dmesg | grep sd. At any rate, partition your disk with cfdisk.
cfdisk /dev/hda
You need at least a root partition (mount point / )of type Linux, which is the default type for newly created partitions in cfdisk. Create a root partition by highlighting a section of Free Space, selecting New, Primary, typing in the size in MB, and placing the partition at the Beginning (or End) of the free space. Leave enough free space for any other partitions you want, such as swap space. The root partition should be marked Bootable unless you are placing /boot on a different partition. A full installation of Slackware will need the root partition to be at least around 3.5GB.
Note: Most types of systems will not support more than four primary partitions. If you need more than four partitions, create one, two, or three primary partitions and place the rest in a logical partition.
You will probably want a swap partition as well. Create a partition just as you would the root partition. Then select Type and press enter a few times. The partition should now be type 82, or Linux Swap.
There are many opinions as to what size the swap partition should be. I only offer my personal experience: once a system has 512 or more MB of physical RAM, it will rarely swap out on a lightly configured system. Heavy desktops, multimedia processing, or data mining / serving may require more swap space. Since I rarely do anything requiring such large amounts of RAM, I use a swap size ofapproximately 512 MB.
Below is an example of what your screen might look like if you are setting up one root partition and one swap partition. hda1 will be used as root, and hda2 will be set up as swap space.
Name Flags Part Type FS Type [Label] Size (MB)
----------------------------------------------------------------------------
hda1 Boot Primary Linux 119513.32
hda2 Primary Linux swap 518.20
This is another example showing how a dual boot set up might be configured. hda1 will be used for Windows, hda2 will be used for Slackware, and hda3 will be used for swap space. Windows will insist on being the bootable partition, and for most systems this is not a problem as long as LILO is installed to the master boot record.
Name Flags Part Type FS Type [Label] Size (MB)
----------------------------------------------------------------------------
hda1 Boot Primary NTFS 59756.66
hda2 Primary Linux 59756.66
hda3 Primary Linux swap 518.20
This last example shows how an older system that is incapable of booting past the 1024 cylinder boundary can be set up as a dual booting system. It is a little tricky to set up, but I have found that when using this set up it is best to install Linux first, then install Windows, then boot up with a Slackware CD and reinstall LILO to the master boot record using chroot. (See SlackwareTips, System and LILO Rescue). hda1 will contain /boot, where all of the information and files needed to boot Linux goes, hda2 will contain Windows, hda3 will be the root file system, and finallyhda4 will be used as swap space.
Name Flags Part Type FS Type [Label] Size (MB)
----------------------------------------------------------------------------
hda1 Boot Primary Linux 32.91
hda2 Primary NTFS 59740.21
hda3 Primary Linux 59740.21
hda4 Primary Linux swap 518.20
Once you have settled on a partitioning scheme (I suggest the first example if you are new to Slackware and don’t requireWindows), select Write, confirm that you wish to rewrite the partition table, then Quit.
Starting Setup¶
After partitioning your disks, run setup at the console prompt. This will take you into an interactive menu system. Once you make a selection from the menu, setup will proceed through each step, taking you back to the menu system once the install is finished.
Select ADDSWAP from the menu. Follow these steps.
- Setup should find the swap partition automatically.
- Select OK at “SWAP SPACE DETECTED” screen.
- Select No at “CHECK SWAP PARTITIONS FOR BAD BLOCKS?” screen
- Setup formats the swap partition.
- Select OK at SWAP SPACE CONFIGURED prompt.
Select the partition for root (mount point /). Follow these steps.
- Setup will list partitions defined to be of type Linux in cfdisk.
- Use the up and down arrow keys to highlight your partition choice, then choose ‘Select’.
- Choose ‘Format’ or ‘Check’ (checks for bad blocks - slow!) and then OK.
- Choose the filesystem type. Ext3 is the safe, standard choice.
- Choose innode density if prompted for it. A density of 4096 is the default, other choices are for special situations such as embedded systems or systems with unusually large amounts of small files.
- Setup formats the root partition.
- Select OK at DONE ADDING LINUX PARTITIONS TO /etc/fstab
Note: If you have more than one partition of type Linux, it will ask you if you would like to go ahead and configure them. Repeat the above process and after selecting (and perhaps formatting), choose a mount point for that partition. For example, in the last disk partitioning example hda3 would be chosen as root and setup would ask about hda1. You would format hda1 using the same filesystem choice as hda3 (probably ext3), then type /boot when asked about where its mount point should be.
Note: Similarly, if you have partitions defined to be of type NTFS or FAT16/32, setup will ask if you would like to make them visible from inside Linux. This just means that you will assign a mount point for those partitions, such as /mnt/windows for a Windows partition. Setup will not format any partition of type NTFS or FAT16/32.
Installing Software¶
When prompted at the SOURCE MEDIA SELECTION screen, choose the install source. This is probably from Slackware CD or DVD. Select ‘auto’ on the following screen to automatically scan for theSlackware disc.
At the PACKAGE SERIES SELECTION screen, use the up and down arrow keys with the space bar to select the desired packageseries. To install everything (recommended for new Slackers), select everything except KDEI (unless you need KDE internationalization support). Press enter for ‘OK’.
When at the SELECT PROMPTING MODE screen, it is recommended to choose ‘full’ and install everything from the packageseries selected if you are a new user. It can be very educational to select ‘menu’ (same as ‘expert’) and look through all of the packages individually with another computer open to the google search engine.After going through a menu install you will be able to customize your Slackware install so that it only has exactly what you want.
System Configuration¶
Once installation of the packages has finished, you will be presented with a series of screens that will set up the initial system configuration. The following section has the title of eachscreen with some bullets that contain notes and suggested responses.
MAKE USB FLASH BOOT Skip making a USB flash boot. You can use the Slackware DVD or first Slackware CD for recovery if needed.
MODEM CONFIGURATION You will probably want to choose ‘no modem’. If you have a modem (that is, a Linux supported modem such as a hardware modem) you can alwayscreate this symlink later.
INSTALL LILO
- Select ‘simple’.
- The most prevalent instance in which the simple LILO selection will have problems is when there is a partition of type NTFS or FAT16/32 definedthat has not yet been formatted. This is because the ‘simple’ LILOchoice will attempt to set up a dual boot if such a partition exists.
CONFIGURE LILO TO USE FRAME BUFFER CONSOLE?
- Choose ‘standard’ for safe choice.
- The only real reason I recommend ‘standard’ is because later you will probably want to install a custom kernel. If that kernel is built without (or with incorrect) frame buffer support you will have problems.
OPTIONAL LILO append=”[kernel parameters]” LINE
- Just hit enter, leave the text entry field blank.
SELECT LILO DESTINATION
- Choose ‘MBR’.
- Pay SPECIAL ATTENTION to the next screen! If you get LILO INSTALL ERROR or somethingindicating that the bootloader did not install correctly, you will have to fix it before the computer will boot. See the last section of this document.
- LILO errors seem to be more common on older computers with Slackware 12 now.
MOUSE CONFIGURATION
- Choose ‘ps2’.
- This will probably not have any effect on your installation, as it is mainly for the console mouse and GPM.
GPM CONFIGURATION
- Select ‘No’ to disable GPM, the console mouse.
- This is a matter of preference, but I find it annoying.
- This screen will only appear if you install GPM.
CONFIGURE NETWORK?
- Select ‘Yes’.
ENTER HOSTNAME
- Key in a descriptive name for your box.
- This is the name you will see when the box boots.
username@hostname:$
ENTER DOMAINNAME for ‘hostname’
- Something like: hostname-you-used.home
- This is not really used unless you will set up services that use it.
- I’ve been told that you should NOT enter domain names such as your ISP’s domain name.
SETUP IP ADDRESS FOR ‘hostname-you-used.domainname-you used’
- You are most likely using DHCP.
- If you are using a modem to dial up instead of broadband ethernet, you can statically assign an internal IP address such as 192.168.0.50.
SET DHCP HOSTNAME
- Leave the text entry field blank and press enter.
CONFIRM STARTUP SERVICES TO RUN
- Disable all services except hald, syslog, messagebus.
- These services can be enabled later.
- Other useful services are cups (for printing), pcmcia (if on a laptop), and ssh (for remote access).
- Note that you do not need sendmail to send mail using an email client such as Thunderbird.
CONSOLE FONT CONFIGURATION
- Select ‘No’.
HARDWARE CLOCK SET TO UTC?
- Your computer’s clock is most likely set to the local time.
TIMEZONE CONFIGURATION
- US/Eastern for ASU students
SELECT DEFAULT WINDOW MANAGER
- Choose and hit ‘OK’
- This may be changed later with xwmconfig for each user.
WARNING: NO ROOT PASSWORD DETECTED
- Select ‘Yes’ to set a root password
SETUP COMPLETE
- Hit enter
- Do a happy dance.
Having completed the initial system configuration, choose ‘EXIT’ from the set up menu. If there were errors installing LILO, read the next section, otherwise press Ctrl+Alt+Del to reboot the computer into your new Slackware install!
Fixing lilo if there are errors¶
If there were errors installing LILO they must be fixed otherwise the system will not boot correctly. Once you exit from the installer and the disc ejects, type df to see what partitions are mounted. You should see the device you chose for the root partition, like /dev/hda1. The mount points for these devices are listed on the right, and you will need to chroot to your root’s mount point, probably chroot /mnt. Once there, run lilo and read the error messages. If you aren’t sure what to do, try running lilo -P ignore. If you get the message ‘Added Linux’ somewhere then you’ll probably be ok. Type exit, press enter, then reboot with Ctrl+Alt+Del.
In one case I dealt with, an entry for Windows was present even though I had not specified anywhere that I had a Windowspartition. Strange, since no version of Slackware since I’ve been usingit have I run into this problem. Anyway, the fix was to edit /etc/lilo.conf and remove the Windows entry, then re-run lilo.
Post Install Configuration¶
See the next article, Slackware Configuration, to begin configuring your system for use.