home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / HOWTO / INSTALLA < prev    next >
Encoding:
Text File  |  1995-04-20  |  59.3 KB  |  1,496 lines

  1.   The Linux Installation HOWTO
  2.   by Matt Welsh, mdw@sunsite.unc.edu
  3.   v3.3,    11 December 1994
  4.  
  5.   This document    describes how to obtain    and install the    Linux software,
  6.   focusing on the popular Slackware distribution (version 2.0.1). It is
  7.   the first document which a new Linux user should read    to get started.
  8.  
  9.   1.  Introduction
  10.  
  11.   Linux    is a freely-distributable implementation of UNIX for 80386 and
  12.   80486    machines. It supports a    wide range of software,    including X
  13.   Windows, Emacs, TCP/IP networking (including SLIP), the works.  This
  14.   document assumes that    you have heard of and know about Linux,    and just
  15.   want to sit down and install it.
  16.  
  17.  
  18.  
  19.   1.1.    Other sources of information
  20.  
  21.   If you have never heard of Linux before, there are several sources of
  22.   basic    information about the system. One is the Linux Frequently Asked
  23.   Questions list (FAQ),    available from
  24.   sunsite.unc.edu:/pub/Linux/docs/FAQ. This document contains many
  25.   common questions (and    answers!) about    Linux---it is a    ``must read''
  26.   for new users.
  27.  
  28.   In the directory /pub/Linux/docs on sunsite.unc.edu you'll find a
  29.   number of other documents about Linux, including the Linux INFO-SHEET
  30.   and META-FAQ,    both of    which you should read.    Also take a look at the
  31.   USENET newsgroups comp.os.linux.help and comp.os.linux.announce.
  32.  
  33.   Another source of online Linux documentation is the Linux HOWTO
  34.   archive, on sunsite.unc.edu:/pub/Linux/docs/HOWTO. The file HOWTO-
  35.   INDEX    in that    directory explains what    Linux HOWTOs are available.
  36.  
  37.   The Linux Documentation Project is writing a set of manuals and books
  38.   about    Linux, all of which are    freely distributable on    the net.  The
  39.   directory /pub/Linux/docs/LDP    on sunsite.unc.edu contains the    current
  40.   set of LDP manuals.
  41.  
  42.   The book ``Linux Installation    and Getting Started'' is a complete
  43.   guide    to getting and installing Linux, as well as how    to use the
  44.   system once you've installed it. It contains a complete tutorial to
  45.   using    and running the    system,    and much more information than is
  46.   contained here. This HOWTO is    simply a condensation of some of the
  47.   most important information in    that book. You can get ``Linux
  48.   Installation and Getting Started'' from sunsite.unc.edu in
  49.   /pub/Linux/docs/LDP/install-guide.  The README file there describes
  50.   how you can order a printed copy of the book (about 180 pages).
  51.  
  52.  
  53.  
  54.   1.2.    New versions of    this document
  55.  
  56.   New versions of the Linux Installation HOWTO will be periodically
  57.   posted to comp.os.linux.announce, comp.os.linux.help,    and
  58.   news.answers.     They will also    be uploaded to various Linux FTP sites,
  59.   including sunsite.unc.edu:/pub/Linux/docs/HOWTO.
  60.  
  61.  
  62.  
  63.   1.3.    Feedback
  64.  
  65.   If you have questions    or comments about this document, please    feel
  66.   free to mail Matt Welsh, at mdw@sunsite.unc.edu. I welcome any
  67.   suggestions, criticism, or postcards.    If you find a mistake with this
  68.   document, please let me know so I can    correct    it in the next version.
  69.   Thanks.
  70.  
  71.  
  72.   2.  Hardware Requirements
  73.  
  74.   What kind of system is needed    to run Linux? This is a    good question;
  75.   the actual hardware requirements for the system change periodically.
  76.   The Linux Hardware-HOWTO gives a (more or less) complete listing of
  77.   hardware supported by    Linux. The Linux INFO-SHEET provides another
  78.   list.
  79.  
  80.   At the very least, a hardware    configuration that looks like the
  81.   following is required:
  82.  
  83.   Any ISA, EISA    or VESA    Local Bus 80386, 80486,    or Pentium system will
  84.   do.  Currently, the MicroChannel (MCA) architecture (found on    IBM PS/2
  85.   machines) is not supported.  Many PCI    bus systems are    supported (see
  86.   the Linux PCI    HOWTO for details).  Any CPU from the 386SX to the
  87.   Pentium will work. You do not    need a math coprocessor, although it is
  88.   nice to have one.
  89.  
  90.   You need at least 4 megabytes    of memory in your machine. Technically,
  91.   Linux    will run with only 2 megs, but most installations and software
  92.   require 4. The more memory you have, the happier you'll be. I    suggest
  93.   8 or 16 megabytes if you're planning to use X-Windows.
  94.  
  95.   Of course, you'll need a hard    drive and an AT-standard drive
  96.   controller. All MFM, RLL, and    IDE drives and controllers should work.
  97.   Many SCSI drives and adaptors    are supported as well; the Linux SCSI-
  98.   HOWTO    contains more information on SCSI.
  99.  
  100.   Linux    can actually run on a single 5.25" HD floppy, but that's only
  101.   useful for installation and maintenance.
  102.  
  103.   Free space on    your hard drive    is needed as well. The amount of space
  104.   needed depends on how    much software you plan to install. Most
  105.   installations    require    somewhere in the ballpark of 40    to 80 megs.
  106.   This includes    space for the software,    swap space (used as virtual RAM
  107.   on your machine), and    free space for users, and so on.
  108.  
  109.   It's conceivable that    you could run a    minimal    Linux system in    10 megs
  110.   or less, and it's conceivable    that you could use well    over 100 megs or
  111.   more for all of your Linux software. The amount varies greatly
  112.   depending on the amount of software you install and how much space you
  113.   require. More    about this later.
  114.  
  115.   Linux    will co-exist with other operating systems, such as MS-DOS,
  116.   Microsoft Windows, or    OS/2, on your hard drive. (In fact you can even
  117.   access MS-DOS    files and run some MS-DOS programs from    Linux.)     In
  118.   other    words, when partitioning your drive for    Linux, MS-DOS or OS/2
  119.   live on their    own partitions,    and Linux exists on its    own. We'll go
  120.   into more detail later.
  121.  
  122.   You do NOT need to be    running    MS-DOS,    OS/2, or any other operating
  123.   system to use    Linux. Linux is    a completely different,    stand-alone
  124.   operating system and does not    rely on    other OS's for installation and
  125.   use.
  126.  
  127.   You also need    a Hercules, CGA, EGA, VGA, or Super VGA    video card and
  128.   monitor.  In general,    if your    video card and monitor work under MS-DOS
  129.   then it should work under Linux. However, if you wish    to run X
  130.   Windows, there are other restrictions    on the supported video hardware.
  131.   The Linux XFree86-HOWTO contains more    information about running X and
  132.   its requirements.
  133.   In all, the minimal setup for    Linux is not much more than is required
  134.   for most MS-DOS or MS    Windows    systems    sold today. If you have    a 386 or
  135.   486 with at least 4 megs of RAM, then    you'll be happy    running    Linux.
  136.   Linux    does not require huge amounts of diskspace, memory, or processor
  137.   speed. I (used to) run Linux on a 386/16 MHz (the slowest machine you
  138.   can get) with    4 megs of RAM, and was quite happy. The    more you want to
  139.   do, the more memory (and faster processor) you'll need. In my
  140.   experience a 486 with    16 megabytes of    RAM running Linux outdoes
  141.   several models of workstation.
  142.  
  143.  
  144.  
  145.   3.  Getting Linux
  146.  
  147.   In this section we'll    cover how to obtain the    Linux software.
  148.  
  149.  
  150.   3.1.    Linux Distributions
  151.  
  152.   Before you can install Linux,    you need to decide on one of the
  153.   ``distributions'' of Linux which are available. There    is no single,
  154.   standard release of the Linux    software---there are many such releases.
  155.   Each release has its own documentation and installation instructions.
  156.  
  157.   Linux    distributions are available both via anonymous FTP and via mail
  158.   order    on diskette, tape, and CD-ROM. The Linux Distribution HOWTO (see
  159.   sunsite.unc.edu in the file /pub/Linux/docs/HOWTO/Distribution-HOWTO)
  160.   includes a list of many Linux    distributions available    via FTP    and mail
  161.   order.
  162.  
  163.   The release of Linux covered in this HOWTO is    the Slackware
  164.   distribution,    maintained by Patrick J. Volkerding
  165.   (volkerdi@mhd1.moorhead.msus.edu). It    is one of the most popular
  166.   distributions    available; it is very up-to-date and includes a    good
  167.   amount of software including X-Windows, TeX, and others.  The
  168.   Slackware distribution consists of a number of ``disk    sets'',    each one
  169.   containing a particular type of software (for    example, the d disk set
  170.   contains development tools such as the gcc compiler, and so forth).
  171.   You can elect    to install whatever disk sets you like,    and can    easily
  172.   install new ones later.
  173.  
  174.   Slackware is also easy to install; it    is very    self-explanatory.  (So
  175.   self-explanatory, in fact, that this HOWTO may not be    necessary.)
  176.  
  177.   The version of Slackware described here is 2.0.0, of 25 June 1994.
  178.   Installation of later    versions of Slackware should be    very similar to
  179.   the information given    here.
  180.  
  181.   Information on other releases    can be found in    the Linux Installation
  182.   and Getting Started manual from the LDP. You can also    find other
  183.   releases of Linux on various FTP sites, including
  184.   sunsite.unc.edu:/pub/Linux/distributions See the Distribution-HOWTO
  185.   (mentioned above) for    details.
  186.  
  187.   The instructions here    should be general enough to be applicable to
  188.   releases other than Slackware. I hate    to be biased towards a single
  189.   release, but I don't have time to keep up with them all! And Slackware
  190.   appears to have what most Linux users    are looking for.
  191.  
  192.  
  193.  
  194.   3.2.    Slackware Space    Requirements
  195.  
  196.   Unfortunately, Slackware does    not maintain a complete    list of
  197.   diskspace requirements for each disk set. You    need at    least 7
  198.   megabytes to install just the    A series of disks; a very rough    estimate
  199.   of the required diskspace would be 2 or 2.5 megabytes    per disk.
  200.  
  201.   The following    disk sets are available:
  202.  
  203.      A    The base system. Enough    to get up and running and have elvis and
  204.     comm programs available. Based around the 1.0.9    Linux kernel,
  205.     and the    new filesystem standard    (FSSTND).
  206.  
  207.     These disks are    known to fit on    1.2M disks, although the rest of
  208.     Slackware won't. If you    have only a 1.2M floppy, you can still
  209.     install    the base system, download other    disks you want and
  210.     install    them from your hard drive.
  211.  
  212.  
  213.      AP    Various    applications and add ons, such as the manual pages,
  214.     groff, ispell (GNU and international versions),    term, joe, jove,
  215.     ghostscript, sc, bc, and the quota patches.
  216.  
  217.  
  218.      D    Program    development. GCC/G++/Objective C 2.5.8,    make (GNU and
  219.     BSD), byacc and    GNU bison, flex, the 4.5.26 C libraries, gdb,
  220.     kernel source for 1.0.9, SVGAlib, ncurses, clisp, f2c, p2c, m4,
  221.     perl, rcs.
  222.  
  223.  
  224.      E    GNU Emacs 19.25.
  225.  
  226.  
  227.      F    A collection of    FAQs and other documentation.
  228.  
  229.  
  230.      I    Info pages for GNU software. Documentation for various programs
  231.     readable by info or Emacs.
  232.  
  233.  
  234.      N    Networking. TCP/IP, UUCP, mailx, dip, deliver, elm, pine, smail,
  235.     cnews, nn, tin,    trn.
  236.  
  237.  
  238.      OOP
  239.     Object Oriented    Programming. GNU Smalltalk 1.1.1, and the
  240.     Smalltalk Interface to X (STIX).
  241.  
  242.  
  243.      Q    Alpha kernel source and    images (currently contains Linux
  244.     1.1.18).
  245.  
  246.  
  247.      TCL
  248.     Tcl, Tk, TclX, blt, itcl.
  249.  
  250.  
  251.      Y    Games. The BSD games collection, and Tetris for    terminals.
  252.  
  253.  
  254.      X    The base XFree86 2.1.1 system, with libXpm, fvwm 1.20, and xlock
  255.     added.
  256.  
  257.  
  258.      XAP
  259.     X applications:    X11 ghostscript, libgr13, seyon, workman,
  260.     xfilemanager, xv 3.01, GNU chess and xboard, xfm 1.2, ghostview,
  261.     and various X games.
  262.  
  263.  
  264.  
  265.      XD    X11 program development. X11 libraries,    server linkkit,    PEX
  266.     support.
  267.  
  268.  
  269.      XV    Xview 3.2 release 5. XView libraries, and the Open Look    virtual
  270.     and non-virtual    window managers.
  271.  
  272.  
  273.      IV    Interviews libraries, include files, and the doc and idraw apps.
  274.     These run unreasonably slow on my machine, but they might still
  275.     be worth looking at.
  276.  
  277.  
  278.      OI    ParcPlace's Object Builder 2.0 and Object Interface Library 4.0,
  279.     generously made    available for Linux developers according to the
  280.     terms in the "copying" notice found in these directories. Note
  281.     that these only    work with libc-4.4.4, but a new    version    may be
  282.     released once gcc 2.5.9    is available.
  283.  
  284.  
  285.      T    The TeX    and LaTeX2e text formatting systems.
  286.  
  287.  
  288.   You must get the ``a'' disk set; the rest are    optional.  I suggest at
  289.   least    installing the a, ap, and d sets, as well as the x set if you
  290.   plan to run X    Windows.
  291.  
  292.  
  293.   3.3.    Getting    Slackware via Mail Order
  294.  
  295.   Slackware is available for free from the Internet, as    well as    via mail
  296.   order    (if you    don't have Internet access, or don't want to take the
  297.   time to download it yourself). The next section describes how    to
  298.   download Slackware from the Internet.
  299.  
  300.   The various mail order distributors for Slackware (and other Linux
  301.   distributions) are listed in the Linux Distribution HOWTO, from
  302.   sunsite.unc.edu in the directory /pub/Linux/docs/HOWTO.
  303.  
  304.  
  305.   3.4.    Getting    Slackware from the Internet
  306.  
  307.   The Slackware    release    of Linux may be    found on any number of FTP sites
  308.   worldwide. The Linux META-FAQ    lists several of the Linux FTP sites; we
  309.   suggest that you try to find the software on the FTP site nearest you,
  310.   to reduce net    traffic. However, two of the major Linux FTP sites are
  311.   sunsite.unc.edu and tsx-11.mit.edu.
  312.  
  313.   The Slackware    release    may be found on    the following FTP sites:
  314.  
  315.   o  sunsite.unc.edu:/pub/Linux/distributions/slackware
  316.  
  317.   o  tsx-11.mit.edu:/pub/linux/packages/slackware
  318.  
  319.   o  ftp.cdrom.com:/pub/linux/slackware
  320.  
  321.      ftp.cdrom.com is Slackware's home site.
  322.  
  323.  
  324.   3.4.1.  Downloading the files
  325.  
  326.   You need to download the following files from    the FTP    sites listed
  327.   above. Make sure that    you use    binary mode when FTPing    them!
  328.  
  329.  
  330.  
  331.   o  The various README    files, as well as SLACKWARE_FAQ.  Be sure to
  332.      read these    files before attempting    to install the software, to get
  333.      any updates or changes to this document.
  334.  
  335.   o  A bootdisk    image. This is a file that you will write to a floppy to
  336.      create the    Slackware boot disk. If    you have a 1.44    megabyte boot
  337.      floppy (3.5"), look in the    directory bootdsks.144.     If you    have a
  338.      1.2 megabyte boot floppy (5.25"), look in the directory
  339.      bootdsks.12.  The README files in these directories describes what
  340.      the files are.
  341.  
  342.      You need one of the following files. (The file READ.ME in these
  343.      directories contains an up-to-date    list of    boot disk images.)
  344.  
  345.   o  bare.gz. This is a    boot floppy that has only IDE hard drive
  346.      drivers. (No SCSI,    CD-ROM,    or networking support.)     Use this if you
  347.      only have an IDE hard drive controller and    aren't going to    be
  348.      installing    over the network or from CD-ROM.
  349.  
  350.   o  xt.gz. This is a boot floppy with IDE and XT hard drive support.
  351.  
  352.   o  cd.gz. Contains IDE hard drive and    non-SCSI CD-ROM    drivers.  Get
  353.      this if you're going to be    installing from    a (non-SCSI) CD-ROM
  354.      (only relevant if you bought a Slackware CD-ROM of    some kind).
  355.  
  356.   o  cdscsi.gz.    Contains IDE and SCSI hard drive support, and non-SCSI
  357.      CD-ROM drivers.
  358.  
  359.  
  360.   o  scsi.gz. Contains IDE and SCSI hard drive support,    and SCSI CD-ROM
  361.      drivers.
  362.  
  363.   o  net.gz. Contains IDE hard drive and TCP/IP    networking support. Get
  364.      this if you are going to install over the network using NFS.
  365.  
  366.   o  scsinet.gz. Contains IDE and SCSI hard drive support, SCSI    CD-ROM
  367.      drivers, and TCP/IP networking support.  You might    want to    try this
  368.      one first;    use bare.gz or one of the other    boot floppies if this
  369.      doesn't work for you.
  370.  
  371.      You need only one of the above bootdisk images, depending on the
  372.      type hardware that    you have in your system.
  373.  
  374.      The issue here is that some hardware drivers conflict with    each
  375.      other in strange ways, and    instead    of attempting to debug hardware
  376.      problems on your system it's easier to use    a boot floppy image with
  377.      only certain drivers enabled. Most    users should try scsi.gz or
  378.      bare.gz.
  379.  
  380.   o  A rootdisk    image. This is a file that you will write to a floppy to
  381.      create the    Slackware installation disk. As    with the bootdisk image,
  382.      look in rootdsks.144 or rootdsks.12 depending on the type of boot
  383.      floppy drive that you have.
  384.  
  385.      You need one of the following files:
  386.  
  387.   o  color144.gz. The menu-based color installation disk for 1.44 meg
  388.      drives. Most users    should use this    rootdisk.
  389.  
  390.   o  umsds144.gz. A version of the color144 disk for installing    with the
  391.      UMSDOS filesystem,    which allows you to install Linux onto a
  392.      directory of an MS-DOS filesystem.    This installation method is not
  393.      discussed in detail here, but it will prevent you from having to
  394.      repartition your drive. More on this later.
  395.  
  396.  
  397.   o  tty144.gz.    The terminal-based installation    disk for 1.44 meg
  398.      drives. You should    use color144.gz, but a few people have reported
  399.      problems with it on their system. If color144.gz doesn't work for
  400.      you, try tty144.gz    instead.  It is    a bit dated and    the installation
  401.      procedure isn't identical,    but it should work if color144.gz
  402.      doesn't.
  403.  
  404.   o  colrlite.gz. The menu-based color installation disk for 1.2 meg
  405.      drives. Some things have been trimmed off of this disk to make it
  406.      fit on a 1.2 meg floppy, but it should work if you    only have a 1.2
  407.      meg drive.
  408.  
  409.  
  410.   o  umsds12.gz. A version of the colrlite disk    for installing with the
  411.      UMSDOS filesystem.    See the    description of umsds144.gz, above.
  412.  
  413.   o  tty12.gz. The terminal-based installation disk for    1.2 meg    drives.
  414.      Use this rootdisk if you have a 1.2 meg boot floppy and colrlite.gz
  415.      doesn't work for you.
  416.  
  417.      Again, you    need only one of the above rootdisk images, depending on
  418.      the type of boot floppy drive that    you have.
  419.  
  420.   o  GZIP.EXE. This is an MS-DOS executable of the gzip    compression
  421.      program used to compress the boot and rootdisk files (the .gz
  422.      extension on the filenames    indicates this). This can be found in
  423.      the install directory.
  424.  
  425.   o  RAWRITE.EXE. This is an MS-DOS program that will write the    contents
  426.      of    a file (such as    the boot and rootdisk images) directly to a
  427.      floppy, without regard to format. You will    use RAWRITE.EXE    to
  428.      create the    boot and root floppies.     This can be found in the
  429.      install directory as well.
  430.  
  431.      You only need RAWRITE.EXE and GZIP.EXE if you plan    to create the
  432.      boot and root floppies from an MS-DOS system. If you have access to
  433.      a UNIX workstation    with a floppy drive instead, you can create the
  434.      floppies from there, using    the dd command.     See the man page for dd
  435.      and ask your local    UNIX gurus for assistance.
  436.  
  437.   o  The files in the directories slakware/a1, slakware/a2, slakware/a3,
  438.      and slakware/a4.  These files make    up the ``a'' disk set of the
  439.      Slackware distribution. They are required.    Later, you will    copy
  440.      these files to MS-DOS floppies for    installation (or, you can
  441.      install from your hard drive). Therefore, when you    download these
  442.      files, keep them in separate directories; don't mix the a1    files
  443.      with the a2 files,    and so on.
  444.  
  445.      Be    sure that you get the files without periods in the filenames as
  446.      well. That    is, within FTP,    use the    command    ``mget *'' instead of
  447.      ``mget *.*''.
  448.  
  449.   o  The files in the directories ap1, ap2, etc., depending on what disk
  450.      sets you are installing. For example, if you are installing the
  451.      ``x'' disk    series,    get the    files in the directories x1 through x5.
  452.      As    with the ``a'' disk set, above,    be sure    to keep    the files in
  453.      separate directories when you download them.
  454.  
  455.  
  456.   3.4.2.  Installation methods
  457.  
  458.   Slackware provides several different means of    installing the software.
  459.   The most popular is installing from an MS-DOS    partition on your hard
  460.   drive; the other is to install from a    set of MS-DOS floppies created
  461.   from the disk    sets that you downloaded.
  462.  
  463.   You can also install Slackware from an NFS-mounted filesystem    over a
  464.   TCP/IP network. This is somewhat involved, however, and a discussion
  465.   of how to do this is out of the range    of this    document. If you need
  466.   help,    ask your local UNIX gurus how to set up    your system to mount an
  467.   NFS filesystem which you can install Slackware from. (For this, you'll
  468.   need another system on the network which has Slackware available on an
  469.   exported filesystem.)
  470.  
  471.   First    we'll describe how to create the boot and root floppies, and
  472.   then we'll describe how to set things    up for either a    hard drive or
  473.   floppy installation.
  474.  
  475.  
  476.   3.4.2.1.  Creating the boot and root floppies
  477.  
  478.   You must create floppies from    the bootdisk and rootdisk images that
  479.   you downloaded, no matter what type of installation you will be doing.
  480.   This is where    the MS-DOS programs GZIP.EXE and RAWRITE.EXE come into
  481.   play.
  482.  
  483.   First    you must uncompress the    bootdisk and rootdisk images using
  484.   GZIP.EXE (on an MS-DOS system, of course). For example, if you're
  485.   using    the bare.gz bootdisk image, issue the MS-DOS command:
  486.  
  487.        C:\> GZIP -D BARE.GZ
  488.  
  489.  
  490.   which    will uncompress    bare.gz    and leave you with the file bare. You
  491.   must similarly uncompress the    rootdisk image.    For example, if    you are
  492.   using    the rootdisk color144.gz, issue    the command:
  493.  
  494.        C:\> GZIP -D COLOR144.GZ
  495.  
  496.  
  497.   which    will uncompress    the file and leave you with color144.
  498.  
  499.   Next,    you must have two high-density MS-DOS formatted    floppies.  (They
  500.   must be of the same type; that is, if    your boot floppy drive is a 3.5"
  501.   drive, both floppies must be high-density 3.5" disks.) You will use
  502.   RAWRITE.EXE to write the boot    and rootdisk images to the floppies.
  503.  
  504.   For example, if you're using the bare.gz bootdisk, use the command:
  505.  
  506.        C:\> RAWRITE
  507.  
  508.  
  509.   Answer the prompts for the name of the file to write (such as    BARE-
  510.   BOOT)    and the    floppy to write    it to (such as A:). RAWRITE will copy
  511.   the file, block-by-block, directly to    the floppy. Also use RAWRITE for
  512.   the root disk    image (such as COLOR144). When you're done, you'll have
  513.   two floppies:    one containing the boot    disk, the other    containing the
  514.   root disk. Note that these two floppies will no longer be readable by
  515.   MS-DOS (they are ``Linux format'' floppies, in some sense).
  516.  
  517.   Be sure that you're using brand-new, error-free floppies. The    floppies
  518.   must have no bad blocks on them.
  519.  
  520.   Note that you    do not need to be running MS-DOS in order to install
  521.   Slackware. However, running MS-DOS makes it easier to    create the boot
  522.   and root floppies, and it makes it easier to install the software (as
  523.   you can install directly from    an MS-DOS partition on your system). If
  524.   you are not running MS-DOS on    your system, you can use someone else's
  525.   MS-DOS system    just to    create the floppies, and install from there.
  526.  
  527.   It is    not necessary to use GZIP.EXE and RAWRITE.EXE under MS-DOS to
  528.   create the boot and root floppies, either. You can use the gzip and dd
  529.   commands on a    UNIX system to do the same job.     (For this, you    will
  530.   need a UNIX workstation with a floppy    drive, of course.) For example,
  531.   on a Sun workstation with the    floppy drive on    device /dev/rfd0, you
  532.   can use the commands:
  533.  
  534.  
  535.        $ gunzip    bare.gz
  536.        $ dd if=bare of=/dev/rfd0 obs=18k
  537.  
  538.  
  539.  
  540.  
  541.   You must provide the appropriate block size argument (the obs    argu-
  542.   ment)    on some    workstations (e.g., Suns) or this will fail. If    you have
  543.   problems the man page    for dd will be instructive.
  544.  
  545.  
  546.   3.4.2.2.  Preparing for installation from hard drive
  547.  
  548.   If you're planning on    installing the Slackware software directly from
  549.   the hard drive (which    is much    faster and more    reliable than a    floppy
  550.   installation), you will need an MS-DOS partition on the system that
  551.   you're installing Slackware to. (That    is, you    must already be    running
  552.   MS-DOS on the    system.)
  553.  
  554.   Note:    If you plan to install Slackware from an MS-DOS    partition, that
  555.   partition must NOT be    compressed with    DoubleSpace, Stacker, or any
  556.   other    MS-DOS drive compression utility. Linux    cannot currently read
  557.   DoubleSpace/Stacker MS-DOS partitions    directly. (You can access them
  558.   via the MS-DOS Emulator, but that is not an option when installing the
  559.   Linux    software.)
  560.  
  561.   To prepare for hard drive installation, simply create    a directory on
  562.   the hard drive to store the Slackware    files. For example,
  563.  
  564.        C:\> MKDIR SLACKWAR
  565.  
  566.  
  567.   will create the directory C:\SLACKWAR    to hold    the Slackware files.
  568.   Under    this directory,    you should create the subdirectories A1, A2, and
  569.   so on, for each disk set that    you downloaded.    All of the files from
  570.   the A1 disk should go    into the directory SLACKWAR\A1,    and so forth.
  571.  
  572.   Now you're ready to go on and    install    the software; skip to the
  573.   section ``Installing the Software''.
  574.  
  575.  
  576.   3.4.2.3.  Preparing for floppy installation
  577.  
  578.   If you wish to install Slackware from    floppies instead of the    hard
  579.   drive, you'll    need to    have one blank,    MS-DOS formatted floppy    for each
  580.   Slackware disk that you downloaded. These disks must be high-density
  581.   format.
  582.  
  583.   The A    disk set (disks    A1 through A4) may be either 3.5" or 5.25"
  584.   floppies. However, the rest of the disk sets must be 3.5" disks.
  585.   Therefore, if    you only have a    5.25" floppy drive, you'll need    to
  586.   borrow a 3.5"    drive from someone in order to install disk sets other
  587.   than A. (Or, you can install from the    hard drive, as explained in the
  588.   previous section.)
  589.  
  590.   To make the disks, simply copy the files from    each Slackware directory
  591.   onto an MS-DOS formatted floppy, using the MS-DOS COPY command. As so:
  592.  
  593.        C:\> COPY A1\*.*    A:
  594.  
  595.   will copy the    contents of the    A1 disk    to the floppy in drive A:.  You
  596.   should repeat    this for each disk that    you downloaded.
  597.  
  598.   You do not need to modify or uncompress the files on the disks in any
  599.   way; you merely need to copy them to MS-DOS floppies.    The Slackware
  600.   installation procedure takes care of uncompressing the files for you.
  601.  
  602.  
  603.   4.  Installing the Software
  604.  
  605.   In this section we'll    describe how to    prepare    your system for
  606.   installing Slackware,    and finally how    to go about installing it.
  607.  
  608.  
  609.   4.1.    Repartitioning
  610.  
  611.   On most systems, the hard drive is already dedicated to partitions for
  612.   MS-DOS, OS/2,    and so on.  You    need to    resize these partitions    in order
  613.   to make space    for Linux.
  614.  
  615.   NOTE:    If you use one of the umsds root diskettes, you    can install
  616.   Slackware TO a directory on your MS-DOS partition. (This is different
  617.   than installing FROM an MS-DOS partition.) Instead, you use the
  618.   ``UMSDOS filesystem'', which allows you to treat a directory of your
  619.   MS-DOS partition as a    Linux filesystem. In this way, you don't have to
  620.   repartition your drive.
  621.  
  622.   I only suggest using this method if your drive has four partitions and
  623.   repartitioning would be more trouble than it's worth.    Or, if you want
  624.   to try Slackware out before repartitioning, this is a    good way to do
  625.   so. But in most cases    you should repartition,    as described here. If
  626.   you do plan to use UMSDOS, you are on    your own---it is not documented
  627.   in detail here. From now on, we assume that you are NOT using    UMSDOS,
  628.   and that you will be repartitioning.
  629.  
  630.   A partition is just a    section    of the hard drive set aside for    a
  631.   particular operating system to use. If you only have MS-DOS installed,
  632.   your hard drive probably has just one    partition, entirely for    MS-DOS.
  633.   To use Linux,    however, you'll    need to    repartition the    drive, so that
  634.   you have one partition for MS-DOS, and one (or more) for Linux.
  635.  
  636.   Partitions come in three flavors: primary, extended, and logical.
  637.   Briefly, primary partitions are one of the four main partitions on
  638.   your drive. However, if you wish to have more    than four partitions per
  639.   drive, you need to create an extended    partition, which can contain
  640.   many logical partitions.  You    don't store data directly on an    extended
  641.   partition---it is used only as a container for logical partitions.
  642.   Data is stored only on either    primary    or logical partitions.
  643.  
  644.   To put this another way, most    people use only    primary    partitions.
  645.   However, if you need more than four partitions on a drive, you create
  646.   an extended partition. Logical partitions are    then created on    top of
  647.   the extended partition, and there you    have it---more than four
  648.   partitions per drive.
  649.  
  650.   Note that you    can easily install Linux on the    second drive on    your
  651.   system (known    as D: to MS-DOS). You simply specify the appropriate
  652.   device name when creating Linux partitions. This is described    in
  653.   detail below.
  654.  
  655.   Back to repartitioning your drive: The problem with resizing
  656.   partitions is    that there is no way to    do it (easily) without deleting
  657.   the data on those partitions.     Therefore, you    will need to make a full
  658.   backup of your system    before repartitioning. In order    to resize a
  659.   partition, we    simply delete the partition(s),    and re-create them with
  660.   smaller sizes.
  661.   NOTE:    There is a non-destructive disk    repartitioner available    for MS-
  662.   DOS, called FIPS. Look on sunsite.unc.edu in the directory
  663.   /pub/Linux/system/Install. With FIPS,    a disk optimizer (such as Norton
  664.   Speed    Disk), and a little bit    of luck, you should be able to resize
  665.   MS-DOS partitions without destroying the data    on them.  It's still
  666.   suggested that you make a full backup    before attempting this.
  667.  
  668.   If you're not    using FIPS, however, the classic way to    modify
  669.   partitions is    with the program FDISK.    For example, let's say that you
  670.   have an 80 meg hard drive, dedicated to MS-DOS. You'd    like to    split it
  671.   in half---40 megs for    MS-DOS and 40 megs for Linux. In order to do
  672.   this,    you run    FDISK under MS-DOS, delete the 80 meg MS-DOS partition,
  673.   and re-create    a 40 meg MS-DOS    partition in its place.    You can    then
  674.   format the new partition and reinstall your MS-DOS software from
  675.   backups. 40 megabytes    of the drive is    left empty. Later, you create
  676.   Linux    partitions on the unused portion of the    drive.
  677.  
  678.   In short, you    should do the following    to resize MS-DOS partitions with
  679.   FDISK:
  680.  
  681.   1. Make a full backup    of your    system.
  682.  
  683.   2. Create an MS-DOS bootable floppy, using a command such as
  684.  
  685.        FORMAT /S A:
  686.  
  687.  
  688.   3. Copy the files FDISK.EXE and FORMAT.COM to    this floppy, as    well as
  689.      any other utilities that you need.    (For example, utilities    to
  690.      recover your system from backup.)
  691.  
  692.   4. Boot the MS-DOS system floppy.
  693.  
  694.   5. Run FDISK,    possibly specifying the    drive to modify    (such as C: or
  695.      D:).
  696.  
  697.   6. Use the FDISK menu    options    to delete the partitions which you wish
  698.      to    resize.    This will destroy all data on the affected partitions.
  699.  
  700.   7. Use the FDISK menu    options    to re-create those partitions, with
  701.      smaller sizes.
  702.  
  703.   8. Exit FDISK    and re-format the new partitions with the FORMAT
  704.      command.
  705.  
  706.   9. Restore the original files    from backup.
  707.  
  708.   Note that MS-DOS FDISK will give you an option to create a ``logical
  709.   DOS drive''. A logical DOS drive is just a logical partition on your
  710.   hard drive. You can install Linux on a logical partition, but    you
  711.   don't    want to    create that logical partition with MS-DOS fdisk. So, if
  712.   you're currently using a logical DOS drive, and want to install Linux
  713.   in its place,    you should delete the logical drive with MS-DOS    FDISK,
  714.   and (later) create a logical partition for Linux in its place.
  715.  
  716.   The mechanism    used to    repartition for    OS/2 and other operating systems
  717.   is similar. See the documentation for    those operating    systems    for
  718.   details.
  719.  
  720.  
  721.  
  722.   4.2.    Creating partitions for    Linux
  723.  
  724.   After    repartitioning your drive, you need to create partitions for
  725.   Linux. Before    describing how to do that, we'll talk about partitions
  726.   and filesystems under    Linux.
  727.   4.2.1.  Filesystems and swap space
  728.  
  729.   Linux    requires at least one partition, for the root filesystem, which
  730.   will hold the    Linux software itself.
  731.  
  732.   You can think    of a filesystem    as a partition formatted for Linux.
  733.   Filesystems are used to hold files. Every system must    have a root
  734.   filesystem, at least.    However, many users prefer to use multiple
  735.   filesystems---one for    each major part    of the directory tree. For
  736.   example, you may wish    to create a separate filesystem    to hold    all
  737.   files    under the /usr directory.  (Note that on UNIX systems, forward
  738.   slashes are used to delimit directories, not backslashes as with MS-
  739.   DOS.)    In this    case you have both a root filesystem, and a /usr
  740.   filesystem.
  741.  
  742.   Each filesystem requires its own partition. Therefore, if you're using
  743.   both root and    /usr filesystems, you'll need to create    two Linux
  744.   partitions.
  745.  
  746.   In addition, most users create a swap    partition, which is used for
  747.   virtual RAM. If you have, say, 4 megabytes of    memory on your machine,
  748.   and a    10-megabyte swap partition, as far as Linux is concerned you
  749.   have 14 megabytes of virtual memory.
  750.  
  751.   When using swap space, Linux moves unused pages of memory out    to disk,
  752.   allowing you to run more applications    at once    on your    system.
  753.   However, because swapping is often slow, it's    no replacement for real
  754.   physical RAM.    But applications that require a    great deal of memory
  755.   (such    as the X Window    System)    often rely on swap space if you    don't
  756.   have enough physical RAM.
  757.  
  758.   Nearly all Linux users employ    a swap partition.  If you have 4
  759.   megabytes of RAM or less, a swap partition is    required to install the
  760.   software. It is strongly recommended that you    have a swap partition
  761.   anyway, unless you have a great amount of physical RAM.
  762.  
  763.   The size of your swap    partition depends on how much virtual memory you
  764.   need.    It's often suggested that you have at least 16 megabytes of
  765.   virtual memory total.    Therefore, if you have 8 megs of physical RAM,
  766.   you might want to create an 8-megabyte swap partition.  Note that swap
  767.   partitions can be no larger than 128 megabytes in size. Therefore, if
  768.   you need more    than 128 megs of swap, you must    create multiple    swap
  769.   partitions. You may have up to 16 swap partitions in all.
  770.  
  771.  
  772.   4.2.2.  Booting the installation disk
  773.  
  774.  
  775.   4.2.2.1.  Specifying hardware    parameters
  776.  
  777.   The first step is to boot the    Slackware bootdisk. After the system
  778.   boots, you will see the message:
  779.  
  780.  
  781.        Welcome to the Slackware    Linux 2.0.0 Bootkernel disk!
  782.  
  783.  
  784.  
  785.  
  786.   Here,    you are    given the opportunity to specify various hardware param-
  787.   eters, such as your SCSI controller IRQ and address, or drive    geome-
  788.   try, before booting the Linux    kernel.     This is necessary in case Linux
  789.   does not detect your SCSI controller or hard drive geometry, for exam-
  790.   ple.
  791.  
  792.  
  793.   In particular, many BIOS-less    SCSI controllers require you to    specify
  794.   the port address and IRQ at boot time. Likewise, IBM PS/1, ThinkPad,
  795.   and ValuePoint machines do not store drive geometry in the CMOS, and
  796.   you must specify it at boot time.
  797.  
  798.   To try booting the kernel without any    special    parameters, just press
  799.   enter    at the boot prompt.
  800.  
  801.   Watch    the messages as    the system boots. If you have a    SCSI controller,
  802.   you should see a listing of the SCSI hosts detected.    If you see the
  803.   message
  804.  
  805.  
  806.        SCSI: 0 hosts
  807.  
  808.  
  809.  
  810.  
  811.   Then your SCSI controller was    not detected, and you will have    to use
  812.   the following    procedure.
  813.  
  814.   Also,    the system will    display    information on the drive partitions and
  815.   devices detected. If any of this information is incorrect or missing,
  816.   you will have    to force hardware detection.
  817.  
  818.   On the other hand, if    all goes well and you hardware seems to    be
  819.   detected, you    can skip to the    following section, ``Loading the root
  820.   disk.''
  821.  
  822.   To force hardware detection, you must    enter the appropriate parameters
  823.   at the boot prompt, using the    following syntax:
  824.  
  825.  
  826.        ramdisk <parameters...>
  827.  
  828.  
  829.  
  830.  
  831.   There    are a number of    such parameters    available; here    are some of the
  832.   most common.
  833.  
  834.   o  hd=cylinders,heads,sectors    Specify    the drive geometry.  Required
  835.      for systems such as the IBM PS/1, ValuePoint, and ThinkPad.  For
  836.      example, if your drive has    683 cylinders, 16 heads, and 32    sectors
  837.      per track,    enter
  838.  
  839.  
  840.        ramdisk hd=683,16,32
  841.  
  842.  
  843.  
  844.  
  845.   o  tmc8xx=memaddr,irq    Specify    address    and IRQ    for BIOS-less Future
  846.      Domain TMC-8xx SCSI controller. For example,
  847.  
  848.  
  849.        ramdisk tmc8xx=0xca000,5
  850.  
  851.  
  852.  
  853.  
  854.   Note that the    0x prefix must be used for all values given in hex. This
  855.   is true for all of the following options.
  856.  
  857.   o  st0x=memaddr,irq Specify address and IRQ for BIOS-less Seagate ST02
  858.      controller.
  859.   o  t128=memaddr,irq Specify address and IRQ for BIOS-less Trantor
  860.      T128B controller.
  861.  
  862.   o  ncr5380=port,irq,dma Specify port,    IRQ, and DMA channel for generic
  863.      NCR5380 controller.
  864.  
  865.   o  aha152x=port,irq,scsi_id,1    Specify    port, IRQ, and SCSI ID for BIOS-
  866.      less AIC-6260 controllers.    This includes Adaptec 1510, 152x, and
  867.      Soundblaster-SCSI controllers.
  868.  
  869.      For each of these,    you must enter `ramdisk' followed by the
  870.      parameter that you    wish to    use.
  871.  
  872.   If you have questions    about these boot-time options, please read the
  873.   Linux    SCSI HOWTO, which should be available on any Linux FTP archive
  874.   site (or from    wherever you obtained this document).  The SCSI    HOWTO
  875.   explains Linux SCSI compatibility in much more detail.
  876.  
  877.  
  878.   4.2.2.2.  Loading the    rootdisk
  879.  
  880.   After    booting    the kernel, you    will be    prompted to enter the Slackware
  881.   root disk:
  882.  
  883.  
  884.        Please remove the boot kernel disk from your floppy drive,
  885.        insert a    disk to    be loaded into the ramdisk, and    press
  886.        [enter] to continue.
  887.  
  888.  
  889.  
  890.  
  891.   At this point    you should remove the bootdisk from the    drive and insert
  892.   the rootdisk.    Then press enter to go on.
  893.  
  894.   The rootdisk will be loaded into memory, and you should be presented
  895.   with a login prompt. Login as    ``root''.
  896.  
  897.  
  898.        slackware login:    root
  899.        #
  900.  
  901.  
  902.  
  903.  
  904.  
  905.   4.2.3.  Using    fdisk
  906.  
  907.   To create Linux partitions, we'll use    the Linux version of the fdisk
  908.   program. After logging in as root, run the command
  909.  
  910.        fdisk <drive>
  911.  
  912.  
  913.   where    <drive>    is the name of the drive that you wish to create Linux
  914.   partitions on. Hard drive device names are:
  915.  
  916.   o  /dev/hda First IDE    drive
  917.  
  918.   o  /dev/hdb Second IDE drive
  919.  
  920.   o  /dev/sda First SCSI drive
  921.  
  922.   o  /dev/sdb Second SCSI drive
  923.  
  924.      For example, to create Linux partitions on    the first SCSI drive in
  925.      your system, use the command
  926.  
  927.        fdisk /dev/sda
  928.  
  929.  
  930.   If you use fdisk without an argument,    it will    assume /dev/hda.
  931.  
  932.   To create Linux partitions on    the second drive on your system, simply
  933.   specify either /dev/hdb (for IDE drives) or /dev/sdb (for SCSI drives)
  934.   when running fdisk.
  935.  
  936.   Your Linux partitions    don't all have to be on    the same drive.     You
  937.   might    want to    create your root filesystem partition on /dev/hda and
  938.   your swap partition on /dev/hdb, for example.    In order to do so just
  939.   run fdisk once for each drive.
  940.  
  941.   Use of fdisk is simple. The command ``p'' displays your current
  942.   partition table. ``n'' creates a new partition, and ``d'' deletes a
  943.   partition.
  944.  
  945.   To Linux, partitions are given a name    based on the drive which they
  946.   belong to. For example, the first partition on the drive /dev/hda is
  947.   /dev/hda1, the second    is /dev/hda2, and so on. If you    have any logical
  948.   partitions, they are numbered    starting with /dev/hda5, /dev/hda6 and
  949.   so on    up.
  950.  
  951.   NOTE:    You should not create or delete    partitions for operating systems
  952.   other    than Linux with    Linux fdisk. That is, don't create or delete MS-
  953.   DOS partitions with this version of fdisk; use MS-DOS's version of
  954.   FDISK    instead. If you    try to create MS-DOS partitions    with Linux
  955.   fdisk, chances are MS-DOS will not recognize the partition and not
  956.   boot correctly.
  957.  
  958.   Here's an example of using fdisk. Here, we have a single MS-DOS
  959.   partition using 61693    blocks on the drive, and the rest of the drive
  960.   is free for Linux. (Under Linux, one block is    1024 bytes. Therefore,
  961.   61693    blocks is about    61 megabytes.)    We will    create two Linux
  962.   partitions: one for swap, and    one for    the root filesystem.
  963.  
  964.   First, we use    the ``p'' command to display the current partition
  965.   table.  As you can see, /dev/hda1 (the first partition on /dev/hda) is
  966.   a DOS    partition of 61693 blocks.
  967.  
  968.   ______________________________________________________________________
  969.   Command (m for help):      p
  970.   Disk /dev/hda: 16 heads, 38 sectors, 683 cylinders
  971.   Units    = cylinders of 608 * 512 bytes
  972.  
  973.        Device Boot  Begin   Start     End  Blocks   Id    System
  974.     /dev/hda1    *    1    1     203   61693    6    DOS 16-bit >=32M
  975.  
  976.   Command (m for help):
  977.   ______________________________________________________________________
  978.  
  979.  
  980.  
  981.   Next,    we use the ``n'' command to create a new partition. The    Linux
  982.   root partition will be 80 megs in size.
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.   ______________________________________________________________________
  992.   Command (m for help):     n
  993.   Command action
  994.       e      extended
  995.       p      primary partition (1-4)
  996.   p
  997.   ______________________________________________________________________
  998.  
  999.  
  1000.   Here we're being asked if we want to create an extended or primary
  1001.   partition. In    most cases you want to use primary partitions, unless
  1002.   you need more    than four partitions on    a drive. See the section
  1003.   ``Repartitioning'', above, for more information.
  1004.  
  1005.   ______________________________________________________________________
  1006.   Partition number (1-4): 2
  1007.   First    cylinder (204-683):  204
  1008.   Last cylinder    or +size or +sizeM or +sizeK (204-683):    +80M
  1009.   ______________________________________________________________________
  1010.  
  1011.  
  1012.  
  1013.   The first cylinder should be the cylinder AFTER where    the last
  1014.   partition left off. In this case, /dev/hda1 ended on cylinder    203, so
  1015.   we start the new partition at    cylinder 204.
  1016.  
  1017.   As you can see, if we    use the    notation ``+80M'', it specifies    a
  1018.   partition of 80 megs in size.    Likewise, the notation ``+80K''    would
  1019.   specify an 80    kilobyte partition, and    ``+80''    would specify just an 80
  1020.   byte partition.
  1021.  
  1022.   ______________________________________________________________________
  1023.   Warning: Linux cannot    currently use 33090 sectors of this partition
  1024.   ______________________________________________________________________
  1025.  
  1026.  
  1027.   If you see this warning, you can ignore it. It is left over from an
  1028.   old restriction that Linux filesystems could only be 64 megs in size.
  1029.   However, with    newer filesystem types,    that is    no longer the case...
  1030.   partitions can now be    up to 4    terabytes in size.
  1031.  
  1032.   Next,    we create our 10 megabyte swap partition, /dev/hda3.
  1033.  
  1034.   ______________________________________________________________________
  1035.   Command (m for help):    n
  1036.   Command action
  1037.       e      extended
  1038.       p      primary partition (1-4)
  1039.   p
  1040.  
  1041.   Partition number (1-4): 3
  1042.   First    cylinder (474-683):  474
  1043.   Last cylinder    or +size or +sizeM or +sizeK (474-683):     +10M
  1044.   ______________________________________________________________________
  1045.  
  1046.  
  1047.  
  1048.   Again, we display the    contents of the    partition table. Be sure to
  1049.   write    down the information here, especially the size of each partition
  1050.   in blocks. You need this information later.
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.   ______________________________________________________________________
  1058.   Command (m for help):    p
  1059.   Disk /dev/hda: 16 heads, 38 sectors, 683 cylinders
  1060.   Units    = cylinders of 608 * 512 bytes
  1061.  
  1062.        Device Boot  Begin   Start     End  Blocks   Id    System
  1063.     /dev/hda1    *    1    1     203   61693    6    DOS 16-bit >=32M
  1064.     /dev/hda2          204     204     473   82080   83    Linux native
  1065.     /dev/hda3          474     474     507   10336   83    Linux native
  1066.   ______________________________________________________________________
  1067.  
  1068.  
  1069.  
  1070.   Note that the    Linux swap partition (here, /dev/hda3) has type    ``Linux
  1071.   native''. We need to change the type of the swap partition to    ``Linux
  1072.   swap'' so that the installation program will recognize it as such. In
  1073.   order    to do this, use    the fdisk ``t''    command:
  1074.  
  1075.   ______________________________________________________________________
  1076.   Command (m for help):    t
  1077.   Partition number (1-4): 3
  1078.   Hex code (type L to list codes): 82
  1079.   ______________________________________________________________________
  1080.  
  1081.  
  1082.   If you use ``L'' to list the type codes, you'll find that 82 is the
  1083.   type corresponding to    Linux swap.
  1084.  
  1085.   To quit fdisk    and save the changes to    the partition table, use the
  1086.   ``w''    command. To quit fdisk WITHOUT saving changes, use the ``q''
  1087.   command.
  1088.  
  1089.   After    quitting fdisk,    the system may tell you    to reboot to make sure
  1090.   that the changes took    effect.    In general there is no reason to reboot
  1091.   after    using fdisk---the version of fdisk on the Slackware distribution
  1092.   is smart enough to update the    partitions without rebooting.
  1093.  
  1094.  
  1095.   4.3.    Preparing the swap space
  1096.  
  1097.   If you have 4    megabytes of RAM (or less) in your machine, you    need to
  1098.   create a swap    partition (using fdisk)    and enable it for use before
  1099.   installing the software. Here, we describe how to format and enable
  1100.   your swap partition(s).
  1101.  
  1102.   If you have more than    4 megs of RAM, you need    only create your
  1103.   partition(s)---it's not necessary to format and enable them before
  1104.   installing the software.  In this case you can skip down to the
  1105.   section ``Installing the Software''.
  1106.  
  1107.   If you get any ``out of memory'' errors during the installation
  1108.   procedure you    should create a    swap partition and enable it as
  1109.   described here.
  1110.  
  1111.   To prepare the swap space for    use, we    use the    mkswap command.     It
  1112.   takes    the form:
  1113.  
  1114.        mkswap -c <partition> <size>
  1115.  
  1116.  
  1117.   where    <partition> is the partition name, such    as /dev/hda3, and <size>
  1118.   is the size of the partition in blocks.
  1119.  
  1120.   For example, if you created the swap partition /dev/hda3 of size 10336
  1121.   blocks, use the command
  1122.  
  1123.   mkswap -c /dev/hda3 10336
  1124.  
  1125.  
  1126.   The -c option    tells mkswap to    check for bad blocks on    the partition
  1127.   when preparing the swap space. If you    see any    ``read_intr'' error mes-
  1128.   sages    during the mkswap operation, this means    that bad blocks    were
  1129.   found    (and flagged). So you can ignore these errors.
  1130.  
  1131.   To enable swapping on    the new    device,    use the    command
  1132.  
  1133.        swapon <partition>
  1134.  
  1135.  
  1136.   For example, for our swap space on /dev/hda3,    we use
  1137.  
  1138.        swapon /dev/hda3
  1139.  
  1140.  
  1141.   We're    now swapping with about    10 megabytes more virtual memory.
  1142.  
  1143.   You should execute mkswap and    swapon for each    swap partition that you
  1144.   created.
  1145.  
  1146.  
  1147.   4.4.    Installing the software
  1148.  
  1149.   Installing the Slackware release is very simple; it's    almost
  1150.   automatic. You use the setup command,    which guides you through a
  1151.   series of menus which    allow you to specify the means of installation,
  1152.   the partitions to use, and so    forth.    Almost everything is automatic.
  1153.  
  1154.   Here,    we're not going    to document many of the    specifics of using
  1155.   setup, because it changes from time to time. setup is    very self-
  1156.   explanatory; it contains its own documentation. Just to give you an
  1157.   idea of what it's like, however, we'll describe what most
  1158.   installations    are like using setup.
  1159.  
  1160.   Before you begin, be sure that you have a high-density MS-DOS
  1161.   formatted floppy on hand. You    will use this floppy to    create a Linux
  1162.   boot diskette.
  1163.  
  1164.   After    running    fdisk (and, perhaps, mkswap and    swapon as described
  1165.   above), issue    the command
  1166.  
  1167.        # setup
  1168.  
  1169.  
  1170.   This will present you    with a colourful menu with various options such
  1171.   as ``Addswap'' (to set up your swap space), ``Source'' (to specify the
  1172.   source of the    software to install, such as floppy or hard drive),
  1173.   ``Target'' (to specify where to install the software), and so    on.
  1174.  
  1175.   In general, you should go through the    menu commands in the following
  1176.   order:
  1177.  
  1178.   1. Addswap. If you created a swap partition (using fdisk), use the
  1179.      addswap menu option to tell the system about it.  This option will
  1180.      present you with a    list of    possible swap partitions; just type in
  1181.      the name of the swap partition(s) that you    wish to    use (such as
  1182.      /dev/hda3). The system will then ask you if you want to format the
  1183.      swap partition, which you should do unless    you already ran    mkswap
  1184.      and swapon    on it.    That is, you should format the swap partition
  1185.      unless you    already    formatted and enabled it by hand as described in
  1186.      the previous section.
  1187.  
  1188.  
  1189.   2. Source. This menu option lets you specify the source for the
  1190.      software to install. You can select several means of installation,
  1191.      such as from floppy or from hard drive. If    you are    installing from
  1192.      floppies, the system will ask you which floppy drive to use. If you
  1193.      are installing from hard drive, the system    will ask you what
  1194.      partition the files are stored on,    and what directory they    are in.
  1195.  
  1196.      For example, if you are installing    from an    MS-DOS partition on your
  1197.      hard drive, and the Slackware files are under the directory
  1198.      C:\SLACKWAR, you should enter the name of the MS-DOS partition
  1199.      (such as /dev/hda1) and the name of the directory (such as
  1200.      /slackwar). Note that you should use forward slashes (/), not
  1201.      backslashes (\), in the directory name.
  1202.  
  1203.      There are other means of installation, such as CD-ROM. These should
  1204.      be    self-explanatory as well.
  1205.  
  1206.   3. Target. This menu item lets you specify what partition(s) to
  1207.      install the software on. The system will display a    list of    possible
  1208.      partitions. First you will    be asked to enter the name of the root
  1209.      partition,    such as    /dev/hda2. You will be asked if    you want to
  1210.      format the    partition; unless you are installing on    a partition
  1211.      previously    formatted for Linux you    should do so. You should use the
  1212.      Second Extended Filesystem    (ext2fs) type for the partition.
  1213.  
  1214.      You will also be given a chance to    use additional partitions for
  1215.      different parts of    the directory tree. For    example, if you    created
  1216.      a separate    partition for the /usr filesystem, you should enter the
  1217.      name of that partition and    the directory that it corresponds to
  1218.      (/usr) when asked.
  1219.  
  1220.   4. Disksets. This option allows you to specify the disksets you wish
  1221.      to    install. Use the arrow keys to scroll through the list;    pressing
  1222.      the spacebar selects or deselects a set. Press return when    you're
  1223.      done selecting disk sets.
  1224.  
  1225.      You may wish to only install a minimal system at this time. That's
  1226.      fine. Only    the A diskset is required. After you have installed the
  1227.      software you may run setup    to install other disksets.
  1228.  
  1229.   5. Install. After setting up all of the parameters above, you're ready
  1230.      to    install    the software. First the    system will ask    you what type of
  1231.      prompting to use; you should use the ``normal'' prompting method
  1232.      (unless you're an expert and have modified    the installation
  1233.      tagfiles in some way).
  1234.  
  1235.      The system    will simply go through each disk set and install the
  1236.      software. For each    software package, a dialog box will be displayed
  1237.      describing    the software. Software packages    that are required will
  1238.      be    installed automatically. For optional software packages    you will
  1239.      be    given the option of either installing or not installing    the
  1240.      package. (If you don't wish to install a certain package now, you
  1241.      can always    use setup on your system to install it later).
  1242.  
  1243.      While the software    is installing, watch out for error messages that
  1244.      may be displayed. The most    common error that you're likely    to run
  1245.      into is ``device full'', which means that you have    run out    of space
  1246.      on    your Linux partitions. Unfortunately, the Slackware installation
  1247.      procedure is not quite smart enough to detect this, and will
  1248.      attempt to    continue installing the    software regardless. If    you get
  1249.      any kind of error messages    during the installation    procedure, you
  1250.      may wish to break out of the installation program (using Ctrl-C) to
  1251.      record them. The only solution for    the ``device full'' problem is
  1252.      to    re-create your Linux partitions    with different sizes, or attempt
  1253.      to    reinstall the software without several of the optional software
  1254.      packages.
  1255.   4.5.    After installation
  1256.  
  1257.   After    installation is    complete, and if all goes well,    you will be
  1258.   given    the option of creating a ``standard boot disk'', which you can
  1259.   use to boot your newly-installed Linux system. For this you will need
  1260.   a blank, high-density    MS-DOS formatted diskette of the type that you
  1261.   boot with on your system. Simply insert the disk when    prompted and a
  1262.   boot diskette    will be    created.
  1263.  
  1264.   You will also    be given the chance to install LILO on your hard drive.
  1265.   LILO (which stands for LInux LOader) is a program that will allow you
  1266.   to boot Linux    (as well as other operating systems, such as MS-DOS)
  1267.   from your hard drive.    If you wish to do this,    just select the
  1268.   appropriate menu option and follow the prompts.
  1269.  
  1270.   If you are using OS/2's Boot Manager,    the menu will include an option
  1271.   for configuring LILO for use with the    Boot Manager, so that you can
  1272.   boot Linux from it.
  1273.  
  1274.   Note that this automated LILO    installation procedure is not foolproof;
  1275.   there    are situations in which    this can fail. Be sure that you    have a
  1276.   way to boot MS-DOS, Linux, and other operating systems from floppy
  1277.   before you attempt to    install    LILO. If the LILO installation fails you
  1278.   will be able to boot your system from    floppy and correct the problem.
  1279.  
  1280.   More information on configuring LILO is given    below.
  1281.  
  1282.   The postinstallation procedure will also take    you through several menu
  1283.   items    allowing you to    configure your system. This includes specifying
  1284.   your modem and mouse device, as well as your time zone. Just follow
  1285.   the menu options.
  1286.  
  1287.  
  1288.   4.6.    Booting    your new system
  1289.  
  1290.   If everything    went as    planned, you should be able to boot your Linux
  1291.   boot floppy (not the Slackware installation floppy, but the floppy
  1292.   created after    installing the software). Or, if you installed LILO, you
  1293.   should be able to boot from the hard drive.  After booting, login as
  1294.   root.    Congratulations! You have your very own    Linux system.
  1295.  
  1296.   If you are booting using LILO, try holding down shift    or control
  1297.   during boot. This will present you with a boot prompt; press tab to
  1298.   see a    list of    options. In this way you can boot Linux, MS-DOS, or
  1299.   whatever directly from LILO.
  1300.  
  1301.   After    booting    your system and    logging    in as root, one    of the first
  1302.   things you should do is create an account for    yourself.  The adduser
  1303.   command may be used for this purpose.    For example,
  1304.  
  1305.  
  1306.        # adduser
  1307.        Login to    add (^C    to quit): ebersol
  1308.        Full Name: Norbert Ebersol
  1309.        GID [100]: 100
  1310.        UID [501]: 501
  1311.        Home Directory [/home/ebersol]: /home/ebersol
  1312.        Shell [/bin/bash]: /bin/bash
  1313.        Password    [ebersol]: new.password
  1314.  
  1315.        Information for new user    [ebersol]:
  1316.        Home directory: [/home/ebersol]    Shell: [/bin/bash]
  1317.        Password: [new.password]     UID: [502] GID:[100]
  1318.        Is this correct?    [y/n]: y
  1319.  
  1320.  
  1321.   adduser will prompt you for various parameters, such as the username,
  1322.   full name, GID (group    ID), UID (user ID), and    so on. For the most part
  1323.   you can use the defaults. If you're unfamiliar with creating users on
  1324.   a UNIX system, I strongly suggest getting a book on UNIX systems
  1325.   administration. It will help you greatly in setting up and using your
  1326.   new system.
  1327.  
  1328.   You can now login as the new user. You can use the keys Alt-F1 through
  1329.   Alt-F8 to switch between virtual consoles, which will    allow you to
  1330.   login    multiple times from the    console. The passwd command can    be used
  1331.   to set the passwords on your new accounts; you should    set a password
  1332.   for root and any new users that you create.
  1333.  
  1334.   Also,    the hostname of    your machine is    set at boot time in the    file
  1335.   /etc/rc.d/rc.M. You should edit this file (as    root) to change    the
  1336.   hostname of the machine.  You    should edit the    lines in this file which
  1337.   run the commands hostname or hostname_notcp. (The default hostname is
  1338.   darkstar.) You may also wish to edit the domainname commands in this
  1339.   file,    if you are on a    TCP/IP network.     (On most Slackware systems the
  1340.   hostname and domain name are set in the file /etc/HOSTNAME, so editing
  1341.   this file will probably suffice.)
  1342.  
  1343.   Obviously, there are many more things    to setup and configure.    A good
  1344.   book on UNIX systems administration should help. (I suggest Essential
  1345.   Systems Administration from O'Reilly and Associates.)     You will pick
  1346.   these    things up as time goes by. You should read various other Linux
  1347.   HOWTOs, such as the NET-2-HOWTO and Printing-HOWTO, for information on
  1348.   other    configuration tasks.
  1349.  
  1350.   After    that, the system is all    yours... have fun!
  1351.  
  1352.  
  1353.   5.  Configuring LILO
  1354.  
  1355.   LILO is a boot loader, which can be used to select either Linux, MS-
  1356.   DOS, or some other operating system at boot time. If you install LILO
  1357.   as the primary boot loader, it will handle the first-stage booting
  1358.   process for all operating systems on your drive. This    works well if
  1359.   MS-DOS is the    only other operating system that you have installed.
  1360.   However, you might be    running    OS/2, which has    it's own Boot Manager.
  1361.   In this case,    you want OS/2's    Boot Manager to    be the primary boot
  1362.   loader, and use LILO just to boot Linux (as the secondary boot
  1363.   loader).
  1364.  
  1365.   The Slackware    installation procedure allows you to install and
  1366.   configure LILO. However, this    method doesn't seem to be smart    enough
  1367.   to handle several peculiar situations. It might be easier in some
  1368.   cases    to configure LILO by hand.
  1369.  
  1370.   In order to set up LILO for your system, just    edit the file
  1371.   /etc/lilo.conf. Below    we present an example of a LILO    configuration
  1372.   file,    where the Linux    root partition is on /dev/hda2,    and MS-DOS is
  1373.   installed on /dev/hdb1 (on the second    hard drive).
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.   # Tell LILO to install itself    as the primary boot loader on /dev/hda.
  1388.   boot = /dev/hda
  1389.   # The    boot image to install; you probably shouldn't change this
  1390.   install = /boot/boot.b
  1391.   # Do some optimization. Doesn't work on all systems.
  1392.   compact
  1393.  
  1394.   # The    stanza for booting Linux.
  1395.   image    = /vmlinuz     # The kernel is in /vmlinuz
  1396.     label = linux     # Give    it the name "linux"
  1397.     root = /dev/hda2     # Use /dev/hda2 as the    root filesystem
  1398.     vga    = ask         # Prompt for VGA mode
  1399.     append = "aha152x=0x340,11,7,1"  # Add this    to the boot options,
  1400.                      # for detecting the SCSI controller
  1401.  
  1402.   # The    stanza for booting MS-DOS
  1403.   other    = /dev/hdb1     # This    is the MS-DOS partition
  1404.     label = msdos     # Give    it the name "msdos"
  1405.     table = /dev/hdb     # The partition table for the second drive
  1406.  
  1407.  
  1408.  
  1409.  
  1410.   Once you have    edited the /etc/lilo.conf file,    run /sbin/lilo as root.
  1411.   This will install LILO on your drive.    Note that you must rerun
  1412.   /sbin/lilo anytime that you recompile    your kernel (something that you
  1413.   don't    need to    worry about just now, but keep it in mind).
  1414.  
  1415.   Note how we use the append option in /etc/lilo.conf to specify boot
  1416.   parameters as    we did when booting the    Slackware bootdisk.
  1417.  
  1418.   You can now reboot your system from the hard drive. By default LILO
  1419.   will boot the    operating system listed    first in the configuration file,
  1420.   which    in this    case is    Linux. In order    to bring up a boot menu, in
  1421.   order    to select another operating system, hold down shift or ctrl
  1422.   while    the system boots; you should see a prompt such as
  1423.  
  1424.        Boot:
  1425.  
  1426.  
  1427.   Here,    enter either the name of the operating system to boot (given by
  1428.   the label line in the    configuration file; in this case, either linux
  1429.   or msdos), or    press tab to get a list.
  1430.  
  1431.   Now let's say    that you want to use LILO as the secondary boot    loader;
  1432.   if you want to boot Linux from OS/2's    Boot Manager, for example.  In
  1433.   order    to boot    a Linux    partition from OS/2 Boot Manager, unfortunately,
  1434.   you must create the partition    using OS/2's FDISK (not    Linux's), and
  1435.   format the partition as FAT or HPFS, so that OS/2 knows about    it.
  1436.   (That's IBM for you.)
  1437.  
  1438.   In order to have LILO    boot Linux from    OS/2 Boot Manager, you only want
  1439.   to install LILO on your Linux    root filesystem    (in the    above example,
  1440.   /dev/hda2). In this case, your LILO config file should look something
  1441.   like:
  1442.  
  1443.  
  1444.        boot = /dev/hda2
  1445.        install = /boot/boot.b
  1446.        compact
  1447.  
  1448.        image = /vmlinuz
  1449.      label = linux
  1450.      root =    /dev/hda2
  1451.      vga = ask
  1452.  
  1453.   Note the change in the boot line. After running /sbin/lilo you should
  1454.   be able to add the Linux partition to    Boot Manager. This mechanism
  1455.   should work for boot loaders used by other operating systems as well.
  1456.  
  1457.  
  1458.   6.  Miscellaneous
  1459.  
  1460.   I don't like to be biased towards the    Slackware release, however, in
  1461.   order    to document multiple releases of Linux,    this file would    be much,
  1462.   much longer. It is simpler and more coherent to cover    the specific
  1463.   instructions for a single release of Linux. The book Linux
  1464.   Installation and Getting Started currently includes general
  1465.   installation instructions which should be applicable to ``any''
  1466.   distribution of Linux. However, because the installation procedures
  1467.   are so varied, covering them all would be very confusing both    to
  1468.   myself and to    the reader.
  1469.  
  1470.   The basic concepts in    this document still hold, no matter what release
  1471.   of Linux you choose. For example, all    releases require you to    run
  1472.   fdisk, and all of them (to my    knowledge) include some    kind of
  1473.   installation menu similar to the setup program.  If you choose to use
  1474.   a release of Linux other than    Slackware, the READMEs and installation
  1475.   instructions that come with that release should be easy to understand
  1476.   in the context of the    material presented here.
  1477.  
  1478.   If you would like a more complete discussion of Linux    installation
  1479.   (instead of the "quick" examples given here),    read the book Linux
  1480.   Installation and Getting Started, from sunsite.unc.edu in
  1481.   /pub/Linux/docs/LDP.    This book includes a complete discussion of how
  1482.   to obtain and    install    Linux, as well as a basic UNIX and systems
  1483.   administration tutorial for new users.
  1484.  
  1485.   Please mail me at mdw@sunsite.unc.edu    if any part of this document is
  1486.   confusing or incorrect. I depend on feedback from readers in order to
  1487.   maintain this    document! I also like to help answer questions about
  1488.   Linux    installation, if you have any.
  1489.  
  1490.   I'd like to thank Patrick Volkerding for his work on the Slackware
  1491.   distribution and assistance in preparing this    document.
  1492.  
  1493.   Best of luck with your new Linux system!
  1494.  
  1495.   Cheers, mdw
  1496.