InfoMagic LINUX Developers Resource QUICKSTARTversion 2.0 by Stacey Brewer and Mark Horton With excerpts from Linux Installation HOWTO by Matt Welsh, mdw@sunsite.unc.edu This document describes how to install the Linux software, focusing on the popular Slackware distribution, as found on the InfoMagic LINUX Developers Resource CD-ROM set. It is the first document which a new Linux user should read to get started. Please refer to the file README.1st on Disc 1 for the directory layout. 1. INTRODUCTION Linux is a freely-distributable implementation of UNIX for 80386, 80486 and Pentium machines. It supports a wide range of software, including X Windows, Emacs, TCP/IP networking (including SLIP and PPP), the works. This document assumes that you have heard of and know about Linux, and just want to sit down and install it. 1.1 Other sources of information If you have never heard of Linux before, there are several sources of basic information about the system. One is the "Linux Frequently Asked Questions" list (FAQ). This document contains many common questions and answers about Linux. The FAQ documents can be found by looking in the "whereami.txt" file which you will find in the "texthelp" directory of disc 1. Another source of current information includes the USENET newsgroups "comp.os.linux.help" and "comp.os.linux.announce". For information on accessing these news groups, contact your internet provider. The Linux Documentation Project is an on-line source of information. It can be accessed via the World Wide Web with the following URL: You can find current information about InfoMagic's Linux products by sending an email request to info@infomagic.com, or get on-line information via the World Wide Web with the following URL: Or you can FTP to ftp.infomagic.com for access to the latest Linux boot disks and patches. Look in the /pub/linux directory. Electronic versions of this document are available by FTP from the "ftp.infomagic.com" archive site, in the directory "/pub/cds/linux/". 1.2 Feedback If you have questions or comments about this document, please feel free to send email to info@infomagic.com. We welcome any suggestions, criticism, or postcards. If you find a mistake in the document, please let us know so we can correct it in the next version. 2. HARDWARE REQUIREMENTS What kind of system is needed to run Linux? The following gives a basic list of hardware that Linux supports. For a more up-to-date listing the best place to look is in the USENET newsgroups comp.os.linux.hardware. A monthly list of the hardware requirements is posted there. Also read the newsgroup comp.os.linux.announce for announcements of support for newer hardware. At the very least, a hardware configuration that looks like the following is required: CPU - Intel 386,486,586 or compatible (math coprocessor not required, but improves performance) BUS - ISA, EISA, VESA Local Bus (PS/2 MCA bus is not supported) MEMORY - 4 Megabytes minimum (most software requires this as a minimum) 8 Megabytes minimum (if you plan to run X-windows) VIDEO - Hercules, CGA, EGA, VGA, or SVGA Graphics card. Almost every graphics card that works under DOS will work under Linux in text mode. If you want to use your video card for X-Windows, please check the XFree compatibility list to be sure that your video card is supported. FLOPPY - Either 5.25Ó 1.2Mb or 3.5Ó 1.44Mb floppy disk is required if you install via a boot and root disk combination HARDDISK - Any AT-standard hard disk and controller (most MFM, RLL, and IDE drives and controllers) (most SCSI disks and controllers) FREE HD SPACE - Varies depending upon the amount of software you install: 16mb - Swap Partition - This is recommended unless you have lots of memory and know what you are doing. 20Mb - Base system only (Not very usable by itself) 40Mb - Above with some applications + modem support 80Mb - Above with compilers and development packages 100Mb - Above with networking packages 150Mb - Above with basic Xwindows (not X programming packages) The above sizes are rough estimates and do not include space for users to work in, nor every package that you might want from the listed disk sets. In general, the more disk space you have, the happier you will be. Linux will coexist with other operating systems on the same hard drive. eg., MS-DOS, WindowsNT, or OS/2. You do NOT need to be running MS-DOS, OS/2, or any other operating system to use Linux. Linux is a completely separate, stand-alone operating system and does not rely on other operating systems for installation and use. Since many Linux users also run MS-DOS, there are many tools that allow installation from MS-DOS, as well as sharing of files between DOS and linux partitions. 3. The Big Picture The next few sections of this document will introduce the Slackware Distribution and guide you through its installation. Slackware is one of several distributions of Linux currently available. It is a copyrighted work, but may be freely distributed. The author of Slackware (Patrick Volkerding) gathers a collection of standard packages from various places, compiles them to run under the current version of the Linux kernel and distributes them as a series of "Disk Sets" that let you install as little or as much as you want. Linux is usually installed into a separate "native" partition on one of your hard disks. It does not need to be on the "C" or primary drive, it can be on any drive IDE or SCSI that you choose. There is also an optional installation that allows it to be installed onto an existing MS-DOS partition. Linux cannot be installed onto a compressed DOS partition, nor can it access compressed DOS partitions. This option is referred to as "UMSDOS". While this method has a slight performance penalty and some subtle limitations, it is a viable option if you are not sure you want to commit to the "Linux Way". InfoMagic has provided several "zip" files of complete UMSDOS installations that can be used to test drive Linux by just "pkunzipping" them to an existing DOS partition and running a provided batch file. This procedure is described in the file "testdriv.txt" in the "help" directory on disc 1. 4. Slackware Distribution Overview -- Disk Sets Unfortunately, Slackware does not maintain a complete list of disk space requirements for each disk set. You need at least 7MB to install just the "A" series of disks; a very rough estimate of the required disk space would be 2 or 2.5MB per disk. The following disk sets are available: A The base system. Enough to get up and running and have Elvis and comm programs available AP Various applications and add-ons, such as the manual pages, groff, ispell (GNU and international versions), term, joe, jove, sc, bc, ghostscript and the quota patches D Program development. GCC/G++/Objective C, make (GNU and BSD), byacc and GNU bison, flex, the C libraries, gdb, kernel source, SVGAlib, ncurses, clisp, f2c, p2c, m4, perl, rcs E GNU Emacs F A collection of FAQs and other documentation. I Info pages for GNU software. Documentation for various programs readable by info or Emacs. N Networking. TCP/IP, UUCP, mailx, dip, deliver, elm, pine, smail, cnews, nn, tin, trn. OOP Object Oriented Programming. GNU Smalltalk, and the Smalltalk Interface to X (STIX). Q Other Kernels (non-SCSI CD). TCL Tcl, Tk, TclX, blt, itcl. Y Games. The BSD games collection, Tetris for terminals, sasteroids, and SVGA Doom. X The base XFree86 system, with libXpm, fvwm, and xlock added. XAP X applications: X11 ghostscript, libgr13, seyon, workman, xfilemanager, xv, GNU chess and xboard, xfm, ghostview, and various X games. XD X11 program development. X11 libraries, server linkkit, PEX support. XV XView, XView libraries, and the Open Look virtual and non-virtual window managers. IV Interviews libraries, include files, and the doc and idraw apps. OI ParcPlaceÕs Object Builder and Object Interface Library, generously made available for Linux developers according to the terms in the "copying" notice found in these directories. T The TeX and LaTeX2e text formatting systems. You must use the "a" disk set; the rest are optional. We suggest at least installing the "a", "ap", and "d" sets, as well as the "x" set if you plan to run X Windows. 4.1 Getting new drivers, patches, and additional packages The Slackware release may be found on the following FTP sites: ftp.infomagic.com:/pub/mirrors/linux/Slackware sunsite.unc.edu:/pub/Linux/distributions/slackware tsx-11.mit.edu:/pub/linux/packages/slackware ftp.cdrom.com:/pub/linux/slackware InfoMagic makes some of the newer patches and boot images available on our FTP site: ftp.infomagic.com:/pub/systems/linux 5. Getting Started with Boot Disks 5.1 The Windows Instructions If you are making the boot and root disks from windows follow the instructions in this section. All commands are from Windows. This example assumes that your hard drive is "C:" and your CD-ROM drive is "D:" 1. Select "Run" from the "program manager" file menu. enter: D:\lininst\lininst.exe, replace "D" with the drive letter of your CD-ROM drive. The linux boot-disk utility will open. 2. Select the type of hard drive which you will be installing to, either SCSI or IDE. 3. Select the Source of the Installation: 3.1. If you will install from a network NFS directory, then select YES for "Networking". 3.2. If you will install from the CD-ROM, select your CD-ROM from the list: SONY CDU-31A/33A Mitsumi (Proprietary Interface) SONY CDU-531/535 Sound Blaster CD-ROM (Panasonic/Matsushita) SCSI CD-ROM NEC 260 (Older non-ATAPI model) ATAPI (compatible) 4. For the "Install Type" select the appropriate option: Color Install - for color displays (default) TTY Install - for mono-only displays UMSDOS Install - to install the UMSDOS version Tape Install - to Install from a tape drive 5. If you have two floppy drives, choose the setting which applies to your A: drive. (The Boot Floppy Drive) If you have only one floppy drive, it will be selected by default. 6. After making your selections, select "OK". 7. When prompted insert a blank floppy disk. 8. Once the first disk is created, you will be prompted to insert another disk. When both disks have been created, you will be ready to install linux. 5.2 The DOS Instructions If you are making the boot and root disks from DOS follow the instructions in this section. All commands are entered at the DOS prompt. This example assumes that your DOS hard drive is "C:" and your cd-rom drive is "D:". First we need to collect the files needed to create the boot and root floppies. If you are installing directly from the cd-rom then you will need to pick a boot disk that supports your cd-rom drive. The file "bootlist.txt" details what each boot image supports. You can find this file in the "help" directory on disc 1. You will need to select a root disk also. The file "rootlist.txt" details the features of each root disk image. This files will be found in the "help" directory on disc 1. The boot and root images are provided in an uncompressed format but still need written to a floppy disk. The program to do this is called "rawrite.exe" This is a DOS program and can be found by looking in the file "whereami.txt" which is found in the "help" directory on disc 1. To find the actual boot and root image files, look in the file "whereami.txt" which will be found in the "help" directory on disc 1. 1. Make a temporary working directory under DOS. eg., C:\mkdir C:\temp 2. Copy the boot and root image files to the c:\temp directory. 3. Copy the "rawrite.exe" program to the c:\temp directory. You will need two floppy disks, one for the boot image and one for the root image. 4. Make the floppies: 4.1. cd c:\temp 4.2. rawrite.exe 4.3. insert a disk in the A: drive. 4.4. when prompted enter the name of the boot image, e.g.,bare 4.5. when prompted enter the drive to write to, enter "A:" 4.6. once the boot disk is created, remove the disk from the drive and insert the second floppy. Type "rawrite.exe" again. 4.7. when prompted enter the name of the root image, e.g., color144 4.8. when prompted enter the drive to write to, enter "A:" 4.9. once the root disk is created, remove the disk from the drive When both disks have been created, you will be ready to install linux. 5.3 The UNIX Instructions 1. First we need to collect the files needed to create the boot and root floppies. If you are installing directly from the cd-rom then you will need to pick a boot disk that supports your cd-rom drive. The file "bootlist.txt" details what each boot image supports. You can find this file in the "help" directory on disc 1. You will need to select a root disk also. The file "rootlist.txt" details the features of each root disk image. This files will be found in the "help" directory on disc 1. The boot and root images are provided in an uncompressed format but still need written to a floppy disk. The UNIX program to do this is called "dd" This program is normally installed on most UNIX systems, including Linux. To find the actual boot and root image files, look in the file "whereami.txt" which will be found in the "help" directory on disc 1. 2. To write the boot image onto a floppy, type the following: dd if=bare of=/dev/fd0 (if using linux) where bare is the name of the boot image you are using and /dev/fd0 is the device name of the floppy drive. the device name of the floppy drive varies from one UNIX system to another. Check the documentation for your system for the specific device name to use. 3. repeat the above procedure for the root disk, replacing the name of the boot image with the name of the root image. When both disks have been created, you will be ready to install linux. Note: The location of files on the cd"s will vary from release to release, however, we are trying to keep the basic installation files on disc 1. Particular installation files can be found by reading the "whereami.txt" file that can be found on disc 1 in the "help" directory. 6. Setting up your Hard Drive Installing from the CD-ROM: Lookup and have the following available: specifications and jumper settings for every card in your computer. Also be sure you know the model numbers for each device. The basic installation requires a "Linux Native" partition as well as a "Linux Swap" partition. This example assumes that your DOS partition is the first partition on the hard drive and you have enough free space left on the drive to create your linux partitions. If your DOS partition takes up the entire hard drive, you can either delete the existing DOS partition, and create a new smaller one, or use the program "fips.exe" to shrink your DOS partition. You can find this program by looking in the file "whereami.txt" which is in the "help" directory of disc 1. 1. Load disc 1 into the cd-rom drive. 2. Insert the boot disk into the A: drive. 3. Reboot the Computer using either "Ctrl-Alt-Del" or "RESET" 4. You will see the word LILO briefly, followed by the Welcome screen for linux. At the bottom of the screen will be the "boot:" prompt. If you need to enter additional parameters so that linux will recognize your hardware, enter them here in the format: ramdisk = The list of overrides, and the parameter list for each is given in the file "override.txt" which you will find on disc 1 in the "help" directory. The word ramdisk refers to the kernel which is being used during boot time. If using overrides from the lilo prompt, you would enter the label for the kernel to use in place of the word ramdisk. 5. Once you have entered any overrides that are needed, press return. If you did not need to enter any overrides, just press return. 6. The boot process will continue, with linux probing your hardware to determine what is installed. If you have entered overrides at the boot prompt, they will be used in place of probing for that particular hardware. 7. When prompted, remove the boot disk and insert the "root" floppy. 8. The root floppy will be loaded into a ramdisk. During the installation process, linux will be running from this ramdisk. 9. When the system has booted, you will see the "login:" prompt. type "root" at the prompt: login: root If you have an IDE hard drive with more than 1024 cylinders, you may need to refer to the section later in this guide on ÒBig IDE DrivesÓ or read the file "ide_help.txt" which can be found on disc 1 in the "help" directory. If you will be using linux in a UMSDOS directory then skip this step, you will not need to repartition to use UMSDOS. Repartitioning Your Hard Disk To create Linux partitions, we"ll use the Linux version of the fdisk program. After logging in as root, run the command fdisk where is the name of the disk that you wish to create Linux partitions on. Hard disk device names are: /dev/hda First IDE disk /dev/hdb Second IDE disk /dev/sda First SCSI disk /dev/sdb Second SCSI disk For example, to create Linux partitions on the first SCSI disk in your system, use the command fdisk /dev/sda If you use fdisk without an argument, it will assume /dev/hda. To create Linux partitions on the second disk on your system, simply specify either /dev/hdb (for IDE drives) or /dev/sdb (for SCSI disks) when running fdisk. Your Linux partitions don"t all have to be on the same disk. You might want to create your root filesystem partition on /dev/hda and your swap partition on /dev/hdb, for example. In order to do so just run fdisk once for each disk. Use of fdisk is simple. The command ÒpÓ displays your current partition table. ÒnÓ creates a new partition, and ÒdÓ deletes a partition. To Linux, partitions are given a name based on the disk which they belong to. For example, the first partition on the disk /dev/hda is /dev/hda1, the second is /dev/hda2, and so on. If you have any logical partitions, they are numbered starting with /dev/hda5, /dev/hda6 and so on up. NOTE: You should not create or delete partitions for operating systems other than Linux with Linux fdisk. That is, don"t create or delete MS-DOS partitions with this version of fdisk; use MS-DOS"s version of FDISK instead. If you try to create MS-DOS partitions with Linux fdisk, chances are MS-DOS will not recognize the partition and not boot correctly. Here is an example of using fdisk. Here, we have a single MS-DOS partition using 61693 blocks on the disk, and the rest of the disk is free for Linux. (Under Linux, one block is 1024 bytes. Therefore, 61693 blocks is about 61 megabytes.) We will create two Linux partitions: one for swap, and one for the root filesystem. First, we use the "p" command to display the current partition table. As you can see, /dev/hda1 (the first partition on /dev/hda) is a DOS partition of 61693 blocks. Next, we use the "n" command to create a new partition. The Linux root partition will be 80 megabytes in size. Here we're being asked if we want to create an extended or primary partition. In most cases you want to use primary partitions, unless you need more than four partitions on a drive. The first cylinder should be the cylinder AFTER where the last partition left off. In this case, /dev/hda1 ended on cylinder 203, so we start the new partition at cylinder 204. As you can see, if we use the notation "+80M", it specifies a partition of 80MB in size. Likewise, the notation "+80K" would specify an 80 kilobyte partition, and "+80" would specify just an 80 byte partition. "Warning: Linux cannot currently use 33090 sectors of this partition" If you see this warning, you can ignore it. It is left over from an old restriction that Linux filesystems could only be 64 megs in size. However, with newer filesystem types, that is no longer the case... partitions can now be up to 4 terabytes (4 million megabytes) in size. Next, we create our 10MB swap partition, /dev/hda3. Again, we display the contents of the partition table. Be sure to write down the information here, especially the size of each partition in blocks. You need this information later. Note that the Linux swap partition (here, /dev/hda3) has type "Linux native". We need to change the type of the swap partition to ÒLinux swapÓ so that the installation program will recognize it as such. In order to do this, use the fdisk "t" command: If you use "L" to list the type codes, you"ll find that 82 is the type corresponding to Linux swap. To quit fdisk and save the changes to the partition table, use the "w" command. To quit fdisk WITHOUT saving changes, use the "q" command. After quitting fdisk, the system may tell you to reboot to make sure that the changes took effect. In general there is no reason to reboot after using fdiskÑ-the version of fdisk on the Slackware distribution is smart enough to update the partitions without rebooting. WARNING: you *will* need to reboot if you changed one or more of the extended or logical partitions - Linux currently does not update the list of extended/logical partitions. Preparing the swap space If you have 4 megabytes of RAM (or less) in your machine, you need to create a swap partition (using fdisk) and enable it for use before installing the software. Here, we describe how to format and enable your swap partition(s). If you have more than 4 megs of RAM, you need only create your partition(s) -- it's not necessary to format and enable them before installing the software. In this case you can skip down to the section "Installing the Software".If you get any "out of memory" errors during the installation procedure you should create a swap partition and enable it as described here. To prepare the swap space for use, we use the "mkswap" command. It takes the form: mkswap -c where is the partition name, such as /dev/hda3, and is the size of the partition in blocks. For example, if you created the swap partition /dev/hda3 of size 10336 blocks, use the command mkswap -c /dev/hda3 10336 The -c option tells mkswap to check for bad blocks on the partition when preparing the swap space. If you see any "read_intr" error messages during the mkswap operation, this means that bad blocks were found (and flagged). So you can ignore these errors. To enable swapping on the new device, use the command swapon For example, for our swap space on /dev/hda3, we use swapon /dev/hda3 We"re now swapping with about 10 megabytes more virtual memory. You should execute mkswap and swapon for each swap partition that you created. Congratulations, you are done setting up the partitions! You can proceed to SETUP now. 7. Running Setup -- Walk Through This section assumes you have successfully created the boot and root floppies, and that you have used fdisk to setup your Linux native and Linux swap partitions (or that you are doing an UMSDOS installation). After running fdisk, you should have rebooted with the boot and root disks. The following example documents the installation procedure when using the Color144 root disk. UMSDOS installation is very similar. 1. After logging in as root you will see the "#" prompt. Type: setup 2. First read the "help" file from the menu. You move the cursor using the arrow keys on the keyboard. Select the menu option by pressing the enter/return key. When done reading the help file, either press esc, or select exit and press return. If you are not using a US keyboard you will need to select "Keymap" from the menu to remap your keyboard. 3. It is recommended that you select use the Verbose installation method unless you are familiar with installing Slackware. You can change the installation method by selecting "Quick" from the menu, then selecting either "Verbose" or "Quick" from the sub-menu. 4. Now select the "Source" option. If you are unable to install from the CD-ROM, then you will need to select one of the alternative options. One good installation method is to install from a hard drive partition. For this method you will need to be able to access the cd-rom from DOS or windows, You will also need about 40+ Mb of free space on your MS-DOS partition (depending on how much you plan to install). Boot into DOS and from there type: "mkdir c:\slack" if you have room on your "C:" drive. The directories you will need are found on the first CD in the directory, \distribu\slackwar\. The directories are organized according to the descriptions given in section 4 of this text. A1, A2, A3, A4 are the A base system. Copy these directories, with their contents to the C:\slack directory. Then, when you type dir "c:\slack" you should see something similar to the following: C:\> dir c:\slack Directory of C:\SLACK . 02-07-95 1:19p .. 02-07-95 1:19p A1 02-07-95 1:19p A2 02-07-95 1:19p A3 02-07-95 1:19p A4 02-07-95 1:19p AP1 02-07-95 1:19p AP2 02-07-95 1:19p AP3 02-07-95 1:19p AP4 02-07-95 1:19p AP5 02-07-95 1:19p Now boot into Linux with the boot and root disks. Type: setup to start the installation program and select "Source". Now select "1 Install from a hard drive partition". If your MS-DOS "C:" partition is the first partition then enter "/dev/hda1" when prompted. Next you will be prompted to enter the directory where setup will find the slackware files. Enter: "/slack" Now skip to Section 8.6 to continue the installation. If your CD-ROM drive is supported by linux, then select option 5, "Install from CD-ROM". Select your CD-ROM drive from the list. Select "distributions/slackware InfoMagic CD-ROM" since you are using the InfoMagic CD-ROM. 5. Now you are ready to setup the Swap partition. This is what linux uses as virtual memory when it has used all of the real memory. Select "AddSwap" from the menu. Linux should find the Swap partition which you setup previously and offer to install it as a swap partition. Select "Yes" at this prompt. When the warning screen appears, READ IT! then press "return" to continue. Select "yes" to turn on swapping using the new swap partition. 6. The next step is to setup the target partitions. Select "Target" from the menu. You will be given a list of all the partitions with the system ID of "83" (Linux native) Enter the partition which will be used as the root or "/" partition. If the second partition will be your root partition, then you would enter: /dev/hda2 Now select the "ext2" filesystem. This is the current standard filesystem to use with Linux. The full name is "Linux Second Extended File System". Next choose the formatting option. "Format" is a good choice if you are sure there are no bad blocks on the hard drive partition which you are formatting. Otherwise, select "Check" to force bad block checking during the format. If the partition is already formatted in the ext2 file system and you do not want to reformat it, then select "no". Next select the "inode density" for the partition. Unless you are an experienced Linux user and know what you are doing, select the default of 4096. If you are only using one "Linux native" partition then skip to step 8 Now the drive will be formatted and setup will proceed. If you have selected multiple Linux native partitions you can choose to use a different partition for several directories. READ THE DIRECTIONS and select accordingly. With your "Linux native" partitions formatted you will be prompted where to mount each partition. e.g., Where would you like to mount /dev/hda2? for this example we enter: / this mounts /dev/hda2 as the root "/" directory. If you have more than one "Linux native" partition select "Yes" to set them up, otherwise select "No". If you had a second "Linux native" partition you could mount it as the "/usr" directory. 7. If you want to make your MS-DOS partition visible from linux you can have it automatically mounted at boot time. When prompted select "Yes", then enter the partition name for your MS-DOS partition, e.g., "/dev/hda1" for DOS as the first partition on the hard drive. Next enter the directory name to mount this DOS partition to. A good choice would be: "/dosc" When you are finally installed and running linux from the hard drive you will be able to access the files on the DOS partition by looking in the /dosc directory. And No. This doesn"t mean you can run your DOS programs from Linux. Look for the DOS emulator to do this. It is called DosEmu. 8. Now enter "q" to continue with the installation. 9. Now you can select the disk sets to install. Select "Install" from the menu. Select disk sets by pressing space, move up and down the list with the cursor keys. The list is scrollable. When the cursor goes past the bottom option, the list will scroll up. Look at the descriptions from section 3 to help you decide what you want to install. It is recommended that you install A and AP. This is the basic Linux system with some additional applications that will be very useful. If you plan to recompile the kernel then select D. If you plan to use a cd-rom drive or network card with Linux, then select Q. This will allow you to choose from several pre-compiled kernels which include support for various hardware configurations. Now select "Install". Unless you are experienced with linux and have made custom tag files, select "Normal". The message ÒPrompt Mode SelectedÓ will appear briefly. Setup will now begin installing Linux onto the hard drive. This is an interactive process. Read the instructions that appear regarding each package. Some hints: Only select one kernel. If you don"t have special needs, then select one of the standard kernels either IDE or IDE+SCSI. If you need to make use of special hardware, then install ONE of the kernels from the Q disk set. Remember, setup will happily let you install everything you select, but if you select more than one kernel, then only the last one selected will be used. Keep this in mind if you install X windows. The last server you select will be the one that is setup. Read the section on X windows for more help. 8. Configuring LILO LILO is a boot loader, which can be used to boot into either Linux, MS-DOS or some other operating system. If you install LILO as the primary boot loader, it will handle the first-stage booting process for all operating systems on your disk. This works well if MS-DOS is the only other operating system that you have installed. However, you might be running OS/2, which has it"s own Boot Manager. In this case, you want OS/2"s Boot Manager to be the primary boot loader, and use LILO just to boot Linux (as the secondary boot loader). The Slackware installation procedure will prompt you to install and configure LILO. However, this method doesn"t seem to be smart enough to handle every situation. It might be necessary to configure LILO by hand. In order to set up LILO manually, just edit the file /etc/lilo.conf. Below we present an example of a LILO configuration file, where the Linux root partition is on /dev/hda2, and MS-DOS is installed on /dev/hda1. This example configuration file will wait for 5 seconds then automatically boot into the first file system listed, in this case, Linux. Lines beginning with "#" are comments and are ignored by lilo. # LILO configuration file # # Start LILO global section # append="hd=cylinders,heads,sectors" # (if you need to specify this) boot = /dev/hda # the boot partition #compact # faster, but won"t work on all systems. delay = 50 # wait for 5 seconds before booting to linux by default vga = normal # force sane state ramdisk = 0 # paranoia setting # End LILO global section # Linux bootable partition config begins image = /vmlinuz # the kernel to use when booting root = /dev/hda2 # the root file system label = linux # the label we can type in at the lilo prompt read-only # Non-UMSDOS filesystems should be mounted read-only for checking # Linux bootable partition config ends # Linux bootable partition config begins other = /dev/hda1 # the dos partition label = dos # the label we can type in at the lilo prompt table = /dev/hda # the partition table for this hard disk # DOS bootable partition config ends # END OF FILE Once you have edited the /etc/lilo.conf file, from the linux prompt, type lilo or /sbin/lilo This should install LILO in the Master Boot Record of the hard drive. Any time you need to use a new kernel or modify the lilo.conf file, you will need to reinstall LILO by typing lilo or /sbin/lilo. By default, LILO will boot the first operating system listed in the lilo.conf file. If you wish to boot into a different operating system that you have listed in /etc/lilo.conf you will need to hold down shift or ctrl when the system is booting. When you get the LILO prompt, press "tab" to see a list of the labels that you can choose from. Entering one of the listed labels will boot the computer into that operating system. If you are using OS/2 and want to boot with the OS/2 boot manager, then LILO will be used as the secondary boot loader. The /etc/lilo.conf will need to be setup similar to the following example. # first bootable sectionboot = /dev/hda2 install = /etc/lilo/boot.b compact # end of first bootable section # linux bootable sectionimage = /vmlinuz label = linux root = /dev/hda2 vga = ask # end of linux bootable section Note the change in the boot line. After running /sbin/lilo you should be able to add the Linux partition to the OS/2 Boot Manager. This method should work for boot loaders used by other operating systems as well. 9. X11 Configuration Cookbook or "How to get X running under Linux (without calling the fire department)" This short guide is to assist you in getting X-windows running on your new Linux system with as little effort as possible. First, let me say that you really should read the file "VideoModes.doc" which you can find (assuming you installed X properly with the documentation) on your system in the directory "/usr/X11R6/lib/X11/doc". This document is an excellent reference for video timing and will let you configure your video card and monitor to achieve the maximum performance possible. However, knowing that very few people will take the time or interest to read this document, this "X-Windows for Dummies" guide is offered to assist you in getting something running. First, you need to make sure you have the following items ... if you don"t have them, please try to get at least the monitor specifications, the card chipset, and the amount of video ram information for your equipment. 1. Monitor Documentation 2. Video Card Documentation 3. Existing video modes (if you have them) Before going further, be sure to note that it IS possible to damage your monitor with incorrect settings ... this is because YOU control the configuration information you are using with the X-Windows software. Thus it is possible to overdrive the horizontal synch. of most monitors and cause damage or even fire. (Yes, they WILL burst into flames... it has happened!) Just because your system was sold to you as a "1024x768 non-interlaced video" system it does NOT mean that it can actually do that... your monitor may not be able to handle the frequencies necessary to deliver that resolution. OK, warnings aside and (hopefully) manuals in hand, let's get about creating your X configuration file. Do the following: 1. Run /usr/X11R6/bin/SuperProbe This utility will probe for and identify installed video hardware. (Please read the man page on SuperProbe for more details.) WRITE THIS INFORMATION DOWN! 2. Run the XFree-86 Configuration Program "xf86config". The XFree86-HOWTO may say to run ÒConfigXF86Ó but that one is for XFree-2.1, not 3.1. Follow the instructions in this program and answer the questions asked by it. If you are lucky, both your video card and your monitor will be among the choices offered; if not, you should choose one with specifications close to what your hardware has and use this as a starting point. For your monitor, check "/usr/X11R6/lib/X11/doc/Monitors" to see if your monitor is there. You will now be asked for your horizontal synch. rate. This is CRITICAL misspecification of this could cause damage to your monitor ... we do not recommend pushing beyond the indicated ranges. Next you will be asked for the vertical synch range for your monitor Ñ enter the appropriate range. NOTE that these horizontal and vertical ranges apply to the MONITOR, not the video card. Your card may support ranges far in excess of your monitor capabilities. Driving a monitor beyond its specification will most likely damage it. Next you are asked for a short description of your monitor definition... enter whatever you like, your dog"s name, your monitor model, etc. Next enter your monitor vendor name and model, again, this is whatever you wish -- make it up! Now we have to configure the X Server to be used. This is entirely dependent upon what type of card you have. Read the documentation for your card. If in doubt, choose the XF86_Mono server as a starting point... it"s ugly, but it will work on any card that supports VGA graphics. The next question will ask if you wish to have the configurator set the symbolic link... you do. Now you"ll be asked for the memory available on your card... use the information you obtained from running SuperProbe in step 1. You"ll now be asked three questions regarding the description of your card, exactly like you were asked about your monitor... make it up. You"ll now be asked to run X -probeonly... do so and write down the clocks information. You"ll now be shown the video modes information... unless you really know what you are doing (in which case you would probably not be using this script anyway!) you should choose the defaults selected for you. The next question regards the location of the default XF86Config file... you most likely should take the default here. After this, you should examine the configuration file generated as indicated and make sure that the clocks lines are as you desire; then test it according to the instructions given. Remember - CTL/ALT/Backspace will (usually) terminate the X-server if the display is unreadable. 3. Fiddle about with the higher resolutions or different modes as your card/monitor is capable of supporting. (ALWAYS save your last working configuration file to some other name so you can get back to a known starting point!) Common problems: It is not unusual to encounter problems when trying to get X Windows working. These usually involve the mouse, the monitor, or the card specifications. Consult the XFree86-HOWTO for suggestions. One of the most common problems has to do with mis-specification of the mouse. Be sure you have specified the proper type (bus or serial) and vendor in your X Configuration. If you are using /dev/mouse for your link to the actual device, be sure that it is actually pointing to the proper device in the /dev/ directory : lrwxrwxrwx 1 root root 5 Feb 7 09:57 /dev/mouse -> ttyS0 lrwxrwxrwx 1 root root 11 May 31 1994 /dev/mouse -> bmouseatixl (or whatever you"ve chosen) This is very important to the proper operation of X... if you are trying to use the wrong mouse definition, X will usually not come up or will have an immovable mouse... The PS/2 has two types of mice... the serial and the PS2 bus mouse... be very careful with these as they often have the same type plug! Screen displays several distorted screens at once... You"re getting close! This is a timing problem... fiddle with your clocks entries to resolve this... try a slower clock and also adjust (carefully!) the timing pulses on the clocks entries. (see the VideoModes.doc file for details.) Diamond Card owners: As you may be aware, the Diamond cards have historically been unsupported by XFree since the Diamond company has refused to release any information about their cards. This is changing with a "statement of intent" by Diamond to work with the XFree team on card support. However, many intrepid souls on the net have fought with these cards and made them work. For further information please look at the file ÒDiamond.FAQÓ which is currently located in the directory sunsite/X11 on the InfoMagic CDs. 10. Help with Large IDE hard drives 10.1 Fix for large IDE drives: There are two options, first you can make Linux believe the DOSish CMOS description of the drive or lose 12 MB of your disk and only use the first 1024 cylinders. The simple option first: (The numbers used in this example are for a Conner 540MB IDE drive) SIMPLE: Boot the machine and interrupt the boot to go to the CMOS configuration. On the base configuration screen you should have the hard disk types listed. Yours may be called ÒuserÓ or 47 for the type. This is where you will find the cylinders, heads, and sectors of the device listed. DO NOT CHANGE THE NUMBER OF SECTORS! This drive is, in reality, a 1048 cylinder, 16 head, 63 sector device. The cylinders and heads have been remapped to satisfy the boot and DOS views of reality which cannot handle more than 1024 cylinders on a device (10 bits for addressing... 2^10 = 1024). The simple fix is to set the cylinders to 1024 and the heads to 16, leaving sectors as 63. This will cost you 24 cylinders [or 24*(540/1048) MB], but will insure that everyone is looking at the same geometry. From then on, the install is simple and straightforward. NOT_SO_SIMPLE: Leave the CMOS set at cyl=524; sect=63; head=32. Boot the Linux boot kernel you"ve made. At the FIRST prompt, enter the REAL disk geometry (NOT what CMOS has set!). In this case, you would type: ramdisk hd=1048,16,63 You can specify the geometry for a second IDE drive by including a second hd= parameter after the first one as in this example: ramdisk hd=1048,16,63 hd=xxxxx,yy,zz (fill in your parameters for x, y, and z) Continue the boot process. When told to, replace the boot diskette with the root diskette you"ve chosen. After Linux comes up, login as root and invoke fdisk. Assuming this is the first IDE drive you are using, type in: fdisk /dev/hda When fdisk starts, press "p" to see the existing partitions. Delete any you DON"T need (hopefully in this case all of them!) Next go to expert mode (enter an "x") From the expert menu, change the cylinders (type in a "c") to the CMOS setting. Likewise for the number of heads (type in an ÒhÓ). Then return to the main menu and define your partitions as you would normally... with the parameters youÓve set fdisk to use as far as number of heads and cylinders. When done, save the new table via the "w" option. After the partition table has been updated, continue the install using "setup" and all should be fine. Note that when you wish to use fdisk again, you"ll have to go through this drill all over to force it to buy what it sees. But now Linux, DOS, and CMOS are all seeing the same (distorted) view of reality! Please note that the above techniques work with ANY drive with more than 1024 cylinders, just adjust the numbers for cylinders and heads as appropriate... i.e. Reduce the number of cylinders via a factor to get it below 1024 and then multiply the number of heads by this same factor. DO NOT CHANGE THE NUMBER OF SECTORS! To make LILO happy, you MUST include the append statement in your LILO configuration file ("/etc/lilo.conf") to describe the real disk geometry for it. Put the following lines at the top of your /etc/lilo.conf file append="hd=cccc,hhhh,ssss" linear where cccc = cylinders hhhh = head sssss = sectors If you have two IDE drives, specify both drives (like this): append="hd=cccc,hhhh,ssss hd=CCCC,HHHH,SSSS" linear where cccc = cylinders for "C:" drive hhhh = cyliners for "C:" drive ssss = sectors for "C:" drive and CCCC = cylinders for "D:" drive HHHH = cyliners for "D:" drive SSSS = sectors for "D" drive With these parameters added (don"t forget to re-run the "/sbin/lilo" command to make the requested changes !), LILO will be able to boot off the new, "big" hard disk. 10.2 Enhanced IDE This excellent explanation is from Patrick LoPresti , Don"t be too surprised if you find yourself doing something slightly different. Note: Kernels newer than 1.1.40 do not have any problem using large IDE drives (IDE drives with over 1024 cylinders). However, many distributions still use older kernels for their installation disks, so this might be relevant. Introduction It is possible to use Linux on a large EIDE drive with no restrictions on where anything resides. This example only deals with DOS and Linux, but the approach suggested should be compatible with other operating systems as well. Background and Terminology Sectors on an ATA (IDE) drive are 512 bytes long. There are two ways to address sectors. Logical Block Address (LBA) form, or logical form, numbers the sectors linearly starting with 0. Cylinder-Head-Sector (CHS) form, or physical form, addresses each sector with a (cylinder, head, sector) triplet. To convert addresses from logical to physical form, it is necessary to know how many heads per cylinder and how many sectors per head the drive has. If the total number of cylinders is known as well, the size of the drive can be determined. The number of cylinders, heads per cylinder ("heads"), and sectors per head ("sectors") is called the "disk geometry". Old controllers and BIOSes require sectors to be addressed in physical form; all controllers and BIOSes allow sectors to be addressed in physical form. Linux uses logical addresses everywhere except at the lowest possible level, when it translates to physical form to talk to the controller. Linux does not use the BIOS for anything except to determine the disk geometry. The partition table records the start and end of each partition in *both* logical and physical form. Both DOS fdisk and Linux fdisk expect these values to agree. DOS fdisk obtains the disk geometry by querying the BIOS; Linux fdisk obtains the geometry by querying the kernel. Now for the fun part. MS-DOS and the BIOS interface use a 10-bit field to hold the cylinder number, so they only allow cylinders 0-1023 to be accessed. This is not sufficient for modern drives, which tend to have 63 sectors/head, 16 heads/cylinder, and many cylinders. The "solution" is a complete hack: An EIDE BIOS will *lie* when queried for the disk geometry by halving (or quartering) the number of cylinders and doubling (or quadrupling) the number of heads. Then whenever a physically addressed I/O request arrives, the BIOS will assume the request is based on the bogus disk geometry, and will convert it appropriately to talk to the controller. This process is called "address translation". The Problem When the Linux kernel queries the BIOS (actually, it just reads the CMOS settings) to determine the disk geometry, it will get the bogus values which claim more than 16 heads. Linux knows that this is impossible, so the code in hd.c gives up and skips the drive. (Note that even though the BIOS is reporting a bogus geometry, requests to the controller still need to be based on the real geometry. Thus merely eliminating the test in hd.c won"t work.) The Wrong Solution One fix is to use the BIOS "setup" program to turn off address translation completely. You may have to manually set the cylinder/head/sector values to the real geometry, or it may be possible to simply turn off the translation, depending on how your setup works. Then you can repartition your drive with DOS and/or Linux fdisk, install both operating systems, and things will work, provided you observe certain restrictions. The problem is that the BIOS still can"t be used to access cylinders above 1023. So all of your DOS partitions will have to be below that limit, as will anything which needs to be accessed through the BIOS. For example, LILO uses the BIOS to do its dirty work; so if you want to use LILO to boot Linux, you will have to make sure the kernel (read: entire root partition) lies below the 1024 cylinder limit. Linux itself, however, will happily access the entire drive. The Right Solution Restrictions are annoying, so we will avoid them. This obviously requires leaving address translation on and dealing with the remaining problems in a different way. To fix the kernel's problem, simply feed the real geometry to the kernel with a boot-time option line. You can do this from the LILO boot prompt by typing " hd=,,". You can also have LILO feed the options automatically by using an "append=" directive in your lilo.conf file. Now the kernel will be able to recognize and access the drive, but when a user mode program (e.g., fdisk or the LILO installer) queries the kernel for the disk geometry, the kernel will return the real geometry, not the bogus one. So Linux fdisk (which queries the kernel) and DOS fdisk (which queries the BIOS) will disagree about how the partition table should look. Also, the LILO installer will be computing physical addresses which are incompatible with what the BIOS (and therefore the LILO runtime) requires. The fdisk problem is easy to fix: Go to expert mode, and set the number of cylinders and number of heads to the bogus (BIOS-compliant) values. Then edit the partition table and write it out, confident that Linux fdisk and DOS fdisk are seeing eye to eye. The LILO problem is just as easy to fix: Add the "linear" directive to your lilo.conf file. This will cause LILO to use logical addresses instead of physical to store its data, forcing LILO to compute physical addresses at run time instead of at install time. This will use the geometry supplied by the BIOS instead of that supplied by the kernel, and everything will "just work". Example/Summary I have a 1 Gig EIDE drive on which I recently installed Linux. Here is the procedure I used. 1. Ran setup and examined the (bogus) disk geometry. It said 505 cylinders, 64 heads, 63 sectors. More than 16 heads is impossible, so the real values must be 2100 cylinders, 16 heads, 63 sectors. 2. Booted DOS boot disk, ran fdisk, created a DOS partition. 3. Booted Slackware boot disk. Typed "ramdisk hd=2100,16,63" to boot the kernel. Ran Linux fdisk, typed "p" to see lots of errors, typed "x" to access expert mode, set cylinders to 505, set heads to 64, returned to normal mode, typed "p" to see my DOS partition and no error messages. Created partitions to heart"s content. Saved partition table and rebooted from Slackware disk (not sure why I had to do this). 4. Installed Slackware normally, creating an ordinary lilo.conf file. 5. Edited lilo.conf (in this case, /mnt/etc/lilo.conf) to add these lines to the top: append="hd=2100,16,63" linear 6. Ran "lilo -r /mnt". I expected to need the "-P ignore" option, but didn"t. Go figure. 7. Installed DOS and Windows, much to my chagrin. Good luck to all. Patrick LoPrestipatl@lcs.mit.edu 11. Problems with SCSI controllers and devices Presented here are some of the most common problems with SCSI controllers and devices such as CD-ROMs, hard drives, and tape drives. If you are having problems getting Linux to recognize your drive or controller, read on. The Linux SCSI HOWTO contains much useful information on SCSI devices in addition to that listed here. SCSI can be particularly tricky to configure at times. A SCSI device is detected at all possible ID"s. This is caused by strapping the device to the same address as the controller. You need to change the jumper settings so that the drive uses a different address from the controller itself. Linux reports sense errors, even if the devices are known to be error-free. This can be caused by bad cables, or by bad termination. If your SCSI bus is not terminated at both ends, you may have errors accessing SCSI devices. When in doubt, always check your cables. SCSI devices report timeout errors. This is usually caused by a conflict with IRQ, DMA, or device addresses. Also check that interrupts are enabled correctly on your controller. SCSI controllers using BIOS are not detected. Detection of controllers using BIOS will fail if the BIOS is disabled, or if your controller"s "signature" is not recognized by the kernel. See the Linux SCSI HOWTO for more information about this. Controllers using memory mapped I/O do not work. This is caused when the memory-mapped I/O ports are incorrectly cached. Either mark the board"s address space as uncacheable in the XCMOS settings, or disable cache altogether. When partitioning, you get a warning that "cylinders > 1024", or you are unable to boot from a partition using cylinders numbered above 1024. BIOS limits the number of cylinders to 1024, and any partition using cylinders numbered above this won"t be accessible from the BIOS. As far as Linux is concerned, this affects only booting; once the system has booted you should be able to access the partition. Your options are to either boot Linux from a boot floppy, or boot from a partition using cylinders numbered below 1024. CD-ROM drive or other removeable media devices are not recognized at boot time. Try booting with a CD-ROM (or disk) in the drive. This is necessary for some devices. If your SCSI controller is not recognized, you may need to force hardware detection at boot time. This is particularly important for BIOS-less SCSI controllers. This distribution allows you to specify the controller IRQ and shared memory address when booting the installation media. For example, if you are using a TMC-8xx controller, you may be able to enter linux tmx8xx=interrupt, memory-address at the LILO boot prompt, where interrupt is the IRQ of controller, and memory-address is the shared memory address. 12. Technical Support Information InfoMagic is pleased to provide unlimited technical support by email to help you get Linux installed and running on your system. Phone support is available via a 900# service for $1.50/minute. We will provide limited support for configuring X-Windows. Due to the overwhelming number of combinations of video cards and monitors it is not always possible for us to provide detailed configuration assistance for X. Feel free to contact us for other support options including remote system maintenance and management contracts. Before contacting InfoMagic Tech Support, please have the following information available: Manufacturer and model of your computer Number, type, capacity, and "geometry" of your hard disks Manufacturer, model, I/O port and IRQ information on all installed cards (especially sound cards and SCSI interfaces) Complete text of any error messages Manufacturer and model of your CD-ROM drive and interface details (Dedicated card, Sound card, IDE, SCSI, etc.) It is also helpful if you can be near your system when you call, as we will often ask you to check configuration details or manually adjust the system startup files. You may reach technical support in any of the following ways: (520) 526-9852 Flagstaff, Arizona (404) 371-0291 Atlanta, Georgia (520) 526-9573 FAX support@InfoMagic.com Internet E-mail Please do not send tech support questions to the "info@infomagic.com" or call the 800 number, they will just refer you to the above numbers and email address!