home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 11 / IOPROG_11.ISO / docs / instal~1 < prev    next >
Encoding:
Text File  |  1997-09-25  |  54.1 KB  |  1,214 lines

  1.   The Linux Installation HOWTO
  2.   by Eric S. Raymond
  3.   v4.8, 22 September 1997
  4.  
  5.   This document describes how to obtain and install Linux software.  It
  6.   is the first document which a new Linux user should read to get
  7.   started.
  8.  
  9.   1.  Introduction
  10.  
  11.   1.1.  Purpose of this document
  12.  
  13.   Linux is a freely-distributable implementation of Unix for inexpensive
  14.   personal machines (it was developed on 386s, and now supports 486,
  15.   586, Pentium, PowerPC, Sun Sparc and DEC Alpha hardware). It supports
  16.   a wide range of software, including X Windows, Emacs, TCP/IP
  17.   networking (including SLIP), and many applications.
  18.  
  19.   This document assumes that you have heard of and know about Linux, and
  20.   now want to sit down and install it.  It focuses on the Intel base
  21.   version, which is the most popular, but much of the advice applies on
  22.   Power PCs, Sparcs and Alphas as well.
  23.  
  24.   1.2.  Other sources of information
  25.  
  26.   If you are new to Linux, there are several sources of basic
  27.   information about the system. The best place to find these is at the
  28.   Linux Documentation Project home page at
  29.   <http://sunsite.unc.edu/LDP/linux.html>.  You can find the latest, up-
  30.   to-date version of this document there, as
  31.   <http://sunsite.unc.edu/LDP/HOWTO/installation-HOWTO.html>
  32.  
  33.   You should probably start by browsing the resources under General
  34.   Linux Information; the Linux INFO-SHEET
  35.   <http://sunsite.unc.edu/LDP/HOWTO/INFO-SHEET.html> and the Linux META-
  36.   FAQ <http://sunsite.unc.edu/LDP/HOWTO/META-FAQ>.  The `Linux
  37.   Frequently Asked Questions' document contains many common questions
  38.   (and answers!) about Linux---it is a ``must read'' for new users.
  39.  
  40.   You can find help for common problems on the USENET newsgroups
  41.   comp.os.linux.help and comp.os.linux.announce.
  42.  
  43.   The Linux Documentation Project is writing a set of manuals and books
  44.   about Linux, all of which are freely distributable on the net and
  45.   available from the LDP home page.
  46.  
  47.   The book ``Linux Installation and Getting Started'' is a complete
  48.   guide to getting and installing Linux, as well as how to use the
  49.   system once you've installed it. It contains a complete tutorial to
  50.   using and running the system, and much more information than is
  51.   contained here.  You can browse it, or download a copy, from the LDP
  52.   home page.
  53.  
  54.   1.3.  New versions of this document
  55.  
  56.   New versions of the Linux Installation HOWTO will be periodically
  57.   posted to comp.os.linux.help and  and news.answers <news:answers>.
  58.   They will also be uploaded to various Linux WWW and FTP sites,
  59.   including the LDP home page.
  60.  
  61.   You can also view the latest version of this on the World Wide Web via
  62.   the URL <http://sunsite.unc.edu/LDP/HOWTO/Installation-HOWTO.html>.
  63.   1.4.  Feedback and Corrections
  64.  
  65.   If you have questions or comments about this document, please feel
  66.   free to mail Eric S. Raymond, at esr@thyrsus.com. I welcome any
  67.   suggestions or criticisms. If you find a mistake with this document,
  68.   please let me know so I can correct it in the next version. Thanks.
  69.  
  70.   Please do not mail me questions about how to solve hardware problems
  71.   encountered during installation.  Consult ``Linux Installation and
  72.   Getting Started'', bug your vendor, or consult the Linux newsgroup
  73.   comp.os.linux.setup.  This HOWTO is intended to be rapid, painless
  74.   guide to normal installation -- a separate HOWTO on hardware problems
  75.   and diagnosis is in preparation.
  76.  
  77.   2.  Recent Changes
  78.  
  79.   ╖  Added the pre-installation checklist.
  80.  
  81.   ╖  Added notes about possible LILO & BIOS problems in the section on
  82.      partitioning.
  83.  
  84.   ╖  Added many cross-references to other HOWTOs and Mini-HOWTOs.
  85.  
  86.   3.  Before You Begin
  87.  
  88.   Before you can install Linux, you'll need to be sure your machine is
  89.   Linux-capable, and choose a Linux to install.
  90.  
  91.   3.1.  Hardware requirements
  92.  
  93.   What kind of system is needed to run Linux? This is a good question;
  94.   the actual hardware requirements for the system change periodically.
  95.   The Linux Hardware-HOWTO,  <http://sunsite.unc.edu/LDP/HOWTO/Hardware-
  96.   HOWTO.html>, gives a (more or less) complete listing of hardware
  97.   supported by Linux. The Linux INFO-SHEET,
  98.   <http://sunsite.unc.edu/LDP/HOWTO/INFO-SHEET.html>, provides another
  99.   list.
  100.  
  101.   For the Intel versions, a hardware configuration that looks like the
  102.   following is required:
  103.  
  104.   Any ISA, EISA, VESA Local Bus or PCI 80386, 80486, Pentium or P-6
  105.   system will do.  The MCA architecture (found on IBM PS/2 machines) is
  106.   supported in the newest development (2.1.x) kernels, but may not be
  107.   ready for prime time yet.  Any CPU from the 386SX to the P-6 will
  108.   work. You do not need a math coprocessor, although it is nice to have
  109.   one.
  110.  
  111.   You need at least 4 megabytes of memory in your machine. Technically,
  112.   Linux will run with only 2 megs, but most installations and software
  113.   require 4. The more memory you have, the happier you'll be. I suggest
  114.   8 or 16 megabytes if you're planning to use X-Windows.
  115.  
  116.   Of course, you'll need a hard drive and an AT-standard drive
  117.   controller. All MFM, RLL, and IDE drives and controllers should work.
  118.   Many SCSI drives and adaptors are supported as well; the Linux SCSI-
  119.   HOWTO contains more information on SCSI.  If you are assembling a
  120.   system from scratch to run Linux, the small additional cost of SCSI is
  121.   well worth it for the extra performance and reliability it brings.
  122.  
  123.   You will need a 3.5" floppy.  While 5.25" floppies are supported under
  124.   Linux, they are little-enough used that you should not count on disk
  125.   images necessarily fitting on them.  (A stripped-down Linux can
  126.   actually run on a single floppy, but that's only useful for
  127.   installation and certain troubleshooting tasks.)
  128.  
  129.   You also need an MDA, Hercules, CGA, EGA, VGA, or Super VGA video card
  130.   and monitor.  In general, if your video card and monitor work under
  131.   MS-DOS then it should work under Linux. However, if you wish to run X
  132.   Windows, there are other restrictions on the supported video hardware.
  133.   The Linux XFree86-HOWTO,
  134.   <http://sunsite.unc.edu/LDP/HOWTO/XFree86-HOWTO.html>, contains more
  135.   information about running X and its requirements.
  136.  
  137.   You'll need a CD-ROM drive.  If it's ATAPI, SCSI, or true IDE you
  138.   should have no problem making it work (but watch for cheap drives
  139.   advertising "IDE" interfaces that aren't true IDE).  If your CD-ROM
  140.   uses a proprietary interface card, it's possible the installation
  141.   kernel you're going to boot from floppy won't be able to see it -- and
  142.   an inaccessible CD-ROM is a installation show-stopper.  Also, CD-ROMs
  143.   that attach to your parallel port won't work at all.  If you're in
  144.   doubt, consult the Linux CD-ROM HOWTO,
  145.   <http://sunsite.unc.edu/LDP/HOWTO/CD-ROM-HOWTO.html> for a list and
  146.   details of supported hardware.
  147.  
  148.   So-called "Plug'n'Play" jumperless cards can be a problem.  Support
  149.   for these is under active development, but not there yet in the 2.0.25
  150.   kernel.  Fortunately this is only likely to be a problem with sound or
  151.   Ethernet cards.
  152.  
  153.   If you're running on a box that uses one of the Motorola 68K
  154.   processors (including Amiga, Atari, or VMEbus machines), see the
  155.   Linux/m68k FAQ at
  156.   <http://www.clark.net/pub/lawrencc/linux/faq/faq.html> for information
  157.   on minimum requirements and the state of the port.  The FAQ now says
  158.   m68k Linux is as stable and usable as the Intel versions.
  159.  
  160.   3.2.  Space requirements and coexistence
  161.  
  162.   You'll need free space for Linux on your hard drive. The amount of
  163.   space needed depends on how much software you plan to install. Most
  164.   installations require somewhere in the ballpark of 40 to 80 megs.
  165.   This includes space for the software, swap space (used as virtual RAM
  166.   on your machine), and free space for users, and so on.
  167.  
  168.   It's conceivable that you could run a minimal Linux system in 10 megs
  169.   or less, and it's conceivable that you could use well over 500 megs or
  170.   more for all of your Linux software. The amount varies greatly
  171.   depending on the amount of software you install and how much space you
  172.   require. More about this later.
  173.  
  174.   Linux will co-exist with other operating systems, such as MS-DOS,
  175.   Microsoft Windows, or OS/2, on your hard drive. (In fact you can even
  176.   access MS-DOS files and run some MS-DOS programs from Linux.)  In
  177.   other words, when partitioning your drive for Linux, MS-DOS or OS/2
  178.   live on their own partitions, and Linux exists on its own. We'll go
  179.   into more detail about such "dual-boot" systems later.
  180.  
  181.   You do NOT need to be running MS-DOS, OS/2, or any other operating
  182.   system to use Linux. Linux is a completely different, stand-alone
  183.   operating system and does not rely on other OSs for installation and
  184.   use.
  185.  
  186.   In all, the minimal setup for Linux is not much more than is required
  187.   for most MS-DOS or Windows 3.1 systems sold today (and it's a good
  188.   deal less than the minimum for Windows 95!).  If you have a 386 or 486
  189.   with at least 4 megs of RAM, then you'll be happy running Linux. Linux
  190.   does not require huge amounts of diskspace, memory, or processor
  191.   speed.  Matt Welsh, the originator of this HOWTO, used to run Linux on
  192.   a 386/16 MHz (the slowest machine you can get) with 4 megs of RAM, and
  193.   was quite happy. The more you want to do, the more memory (and faster
  194.   processor) you'll need. In our experience a 486 with 16 megabytes of
  195.   RAM running Linux outdoes several models of expensive workstation.
  196.  
  197.   3.3.  Choosing a Linux distribution
  198.  
  199.   Before you can install Linux, you need to decide on one of the
  200.   ``distributions'' of Linux which are available. There is no single,
  201.   standard release of the Linux software---there are many such releases.
  202.   Each release has its own documentation and installation instructions.
  203.  
  204.   Linux distributions are available both via anonymous FTP and via mail
  205.   order on diskette, tape, and CD-ROM. The Linux Distribution HOWTO,
  206.   <http://sunsite.unc.edu/LDP/HOWTO/Distribution-HOWTO.html>, includes
  207.   descriptions of many Linux distributions available via FTP and mail
  208.   order.
  209.  
  210.   In the dim and ancient past when this HOWTO was first written
  211.   (1992-93), most people got Linux by tortuous means involving long
  212.   downloads off the Internet or a BBS onto their DOS machines, followed
  213.   by an elaborate procedure which transferred the downloads onto
  214.   multiple floppy disks.  One of these disks would then be booted and
  215.   used to install the other dozen.  With luck (and no media failures)
  216.   you'd finish your installation many hours later with a working Linux.
  217.   Or maybe not.
  218.  
  219.   While this path is still possible (and you can download any one of
  220.   several disatributions from
  221.   <http://sunsite.unc.edu/pub/Linux/distributions/INDEX.html>), there
  222.   are now much less strenuous ways. The easiest is to buy one of the
  223.   high-quality commercial Linux distributions distributed on CD-ROM,
  224.   such as Red Hat, Craftworks, Linux Pro, or WGS.  These are typically
  225.   available for less than $50 at your local bookstore or computer shop,
  226.   and will save you many hours of aggravation.
  227.  
  228.   You can also buy anthology CD-ROMs such as the InfoMagic Linux
  229.   Developer's Resource set. These typically include several Linux
  230.   distributions and a recent dump of major Linux archive sites, such as
  231.   sunsite or tsx-11.
  232.  
  233.   In the remainder of this HOWTO we will focus on the steps needed to
  234.   install from an anthology CD-ROM, or one of the lower-end commercial
  235.   Linuxes that doesn't include a printed installation manual.  If your
  236.   Linux includes a paper manual some of this HOWTO may provide useful
  237.   background, but you should consult the manual for detailed
  238.   installation instructions.
  239.  
  240.   4.  Installation Overview
  241.  
  242.   4.1.  Basic Installation Steps
  243.  
  244.   The basic outline of Linux installation is simple:
  245.  
  246.   1. Collect configuration information on your hardware.
  247.  
  248.   2. Make installation floppies.
  249.  
  250.   3. If you want to run a "dual-boot" system (Linux and DOS or Windows
  251.      both), rearrange (repartition) your disk to make room for Linux.
  252.  
  253.   4. Boot an installation mini-Linux from the floppies in order to get
  254.      access to the CD-ROM.
  255.  
  256.   5. Prepare the Linux filesystems.  (If you didn't edit the disk
  257.      partition table earlier, you will at this stage.)
  258.  
  259.   6. Install a basic production Linux from the CD-ROM.
  260.  
  261.   7. Boot Linux from the hard drive.
  262.  
  263.   8. (Optional) Install more packages from CD-ROM.
  264.  
  265.   4.2.  Basic Parts of an Installation Kit
  266.  
  267.   Here are the basic parts of an installable distribution:
  268.  
  269.   1. The README and FAQ files.  These will usually be located in the
  270.      top-level directory of your CD-ROM and be readable once the hard
  271.      disk has been mounted under Linux.  (Depending on how the CD-ROM
  272.      was generated, they may even be visible under DOS/Windows.) It is a
  273.      good idea to read these files as soon as you have access to them,
  274.      to become aware of important updates or changes.
  275.  
  276.   2. A number of bootdisk images (often in a subdirectory).  One of
  277.      these is is the file that you will write to a floppy to create the
  278.      boot disk.  You'll select one of the above bootdisk images,
  279.      depending on the type hardware that you have in your system.
  280.  
  281.   The issue here is that some hardware drivers conflict with each other
  282.   in strange ways, and instead of attempting to debug hardware problems
  283.   on your system it's easier to use a boot floppy image with only the
  284.   drivers you need enabled.  (This will have the nice side effect of
  285.   making your kernel smaller.)
  286.  
  287.   ╖  A rootdisk image (or perhaps two). This is a file that you will
  288.      write to a floppy to create the installation disk(s).  Nowadays the
  289.      root disk or disks is generally independent of your hardware type;
  290.      it will assume an EGA or better color screen.
  291.  
  292.   ╖  A rescue disk image.  This is a disk containing a basic kernel and
  293.      tools for disaster recovery in case something steps on the kernel
  294.      or boot block of your hard disk.
  295.  
  296.   ╖  RAWRITE.EXE. This is an MS-DOS program that will write the contents
  297.      of a file (such as a boot or rootdisk image) directly to a floppy,
  298.      without regard to format.
  299.  
  300.   You only need RAWRITE.EXE if you plan to create your boot and root
  301.   floppies from an MS-DOS system. If you have access to a UNIX
  302.   workstation with a floppy drive instead, you can create the floppies
  303.   from there, using the `dd' command.  or possibly a vendor-provided
  304.   build script.  See the man page for dd(1) and ask your local UNIX
  305.   gurus for assistance.
  306.  
  307.   ╖  The CD-ROM itself.  The purpose of the boot disk is to get your
  308.      machine ready to load the root or installation disks, which in turn
  309.      are just devices for preparing your hard disk and copying portions
  310.      of the CD-ROM to it.
  311.  
  312.   5.  Installation In Detail
  313.  
  314.   5.1.  Getting prepared for installation
  315.  
  316.   Linux makes more effective use of PC hardware than MS-DOS, Windows or
  317.   NT, and is accordingly less tolerant of misconfigured hardware.  There
  318.   are a few things you can do before you start that will lessen your
  319.   chances of being stopped by this kind of problem.
  320.  
  321.   First, collect any manuals you have on your hardware -- motherboard,
  322.   video card, monitor, modem, etc. -- and put them within easy reach.
  323.  
  324.   Second, gather detailed information on your hardware configuration.
  325.   One easy way to do this, if you're running MS-DOS 5.0, or up, is to
  326.   print a report from the Microsoft diagnostic utility msd.exe (you can
  327.   leave out the TSR, driver, memory-map, environment-strings and OS-
  328.   version parts).  Among other things, this will guarantee you full and
  329.   correct information on your video card and mouse type, which will be
  330.   helpful in configuring X later on.
  331.  
  332.   Third, check your machine for configuration problems with supported
  333.   hardware that could cause an un-recoverable lockup during Linux
  334.   installation.
  335.  
  336.   ╖  It is possible for a DOS/Windows system using IDE hard drive(s) and
  337.      CD ROM to be functional even with the master/slave jumpers on the
  338.      drives incorrectly set.  Linux won't fly this way.  If in doubt,
  339.      check your master-slave jumpers!
  340.  
  341.   ╖  Is any of your peripheral hardware designed with neither
  342.      configuration jumpers nor non-volatile configuration memory?  If
  343.      so, it may require boot-time initialization via an MS-DOS utility
  344.      to start up, and may not be easily accessible from Linux.  CD-ROMs,
  345.      sound cards, Ethernet cards and low-end tape drives can have this
  346.      problem.  If so, you may be able to work around this with an
  347.      argument to the boot prompt; see the Linux Boot Prompt HOWTO,
  348.      <http://sunsite.unc.edu/LDP/HOWTO/BootPrompt-HOWTO.html> for
  349.      details).
  350.  
  351.   ╖  Some other operating systems will allow a bus mouse to share an IRQ
  352.      with other devices.  Linux doesn't support this; in fact, trying it
  353.      may lock up your machine.  If you are using a bus mouse, see the
  354.      Linux Bus Mouse HOWTO,  <http://sunsite.unc.edu/LDP/HOWTO/Busmouse-
  355.      HOWTO.html>, for details.
  356.  
  357.   If possible, get the telephone number of an experienced Linux user you
  358.   can call in case of emergency.  Nine times out of ten you won't need
  359.   it, but it's comforting to have.
  360.  
  361.   Budget time for installation.  That will be about one hour on a bare
  362.   system or one being converted to all-Linux operation.  Or up to three
  363.   hours for a dual-boot system (they have a much higher incidence of
  364.   false starts and hangups).
  365.  
  366.   5.2.  Creating the boot and root floppies
  367.  
  368.   Your Linux CD-ROM may come with installation aids that will take you
  369.   through the process of building boot, root, and rescue disks with
  370.   interactive prompts.  These may be an MS-DOS installation program
  371.   (such as the Red Hat redhat.exe program) or a Unix script, or both.
  372.  
  373.   If you have such a program and can use it, you should read the rest of
  374.   this subsection for information only.  Run the program to do actual
  375.   installation -- its authors certainly knew more about the specific
  376.   distribution than I, and you'll avoid many error-prone hand-entry
  377.   steps.
  378.  
  379.   More detailed information on making boot and root disks, see the Linux
  380.   Bootdisk HOWTO at  <http://sunsite.unc.edu/LDP/HOWTO/Bootdisk-
  381.   HOWTO.html>.
  382.  
  383.   Your first step will be to select a boot-disk image to fit your
  384.   hardware.  If you must do this by hand, you'll generally find that
  385.   either (a) the bootdisk images on your CD-ROM are named in a way that
  386.   willl help you pick a correct one, or (b) there's an index file nearby
  387.   describing each image.
  388.  
  389.   Next, you must create floppies from the bootdisk image you selected,
  390.   and from the root and rescue disk images.  This is where the MS-DOS
  391.   program RAWRITE.EXE comes into play.
  392.  
  393.   Next, you must have two or three high-density MS-DOS formatted
  394.   floppies.  (They must be of the same type; that is, if your boot
  395.   floppy drive is a 3.5" drive, both floppies must be high-density 3.5"
  396.   disks.) You will use RAWRITE.EXE to write the boot and rootdisk images
  397.   to the floppies.
  398.  
  399.   Invoke it with no arguments, like this:
  400.  
  401.        C:\> RAWRITE
  402.  
  403.   Answer the prompts for the name of the file to write and the floppy to
  404.   write it to (such as A:). RAWRITE will copy the file, block-by-block,
  405.   directly to the floppy. Also use RAWRITE for the root disk image (such
  406.   as COLOR144). When you're done, you'll have two floppies: one
  407.   containing the boot disk, the other containing the root disk. Note
  408.   that these two floppies will no longer be readable by MS-DOS (they are
  409.   ``Linux format'' floppies, in some sense).
  410.  
  411.   You can use the dd(1) commands on a UNIX system to do the same job.
  412.   (For this, you will need a UNIX workstation with a floppy drive, of
  413.   course.)  For example, on a Sun workstation with the floppy drive on
  414.   device /dev/rfd0, you can use the command:
  415.  
  416.        $ dd if=bare of=/dev/rfd0 obs=18k
  417.  
  418.   You must provide the appropriate output block size argument (the `obs'
  419.   argument) on some workstations (e.g., Suns) or this will fail. If you
  420.   have problems the man page for dd(1) may be be instructive.
  421.  
  422.   Be sure that you're using brand-new, error-free floppies. The floppies
  423.   must have no bad blocks on them.
  424.  
  425.   Note that you do not need to be running Linux or MS-DOS in order to
  426.   install Linux.  However, running Linux or MS-DOS makes it easier to
  427.   create the boot and root floppies from your CD-ROM. If you don't have
  428.   an operating system on your machine, you can use someone else's Linux
  429.   or MS-DOS just to create the floppies, and install from there.
  430.  
  431.   5.3.  Repartitioning your DOS/Windows drives
  432.  
  433.   On most used systems, the hard drive is already dedicated to
  434.   partitions for MS-DOS, OS/2, and so on.  You'll need to resize these
  435.   partitions in order to make space for Linux.  If you're going to run a
  436.   dual-boot system, it's strongly recommended that you read one or more
  437.   of the following mini-HOWTOS, which describe different dual-boot
  438.   configurations.
  439.  
  440.   ╖  The Linux+DOS+Win95 mini-HOWTO,
  441.      <http://sunsite.unc.edu/LDP/HOWTO/mini/Linux+DOS+Win95>.
  442.  
  443.   ╖  The Linux+OS2+DOS mini-HOWTO,
  444.      <http://sunsite.unc.edu/LDP/HOWTO/mini/Linux+OS2+DOS>.
  445.  
  446.   ╖  The DOS-Win95-OS2-Linux mini-HOWTO,
  447.      <http://sunsite.unc.edu/LDP/HOWTO/mini/Linux+DOS+Win95+OS2>.
  448.  
  449.   ╖  The Linux+Win95 mini-HOWTO,
  450.      <http://sunsite.unc.edu/LDP/HOWTO/mini/Linux+Win95>
  451.  
  452.   ╖  The Linux+WinNT mini-HOWTO,
  453.      <http://sunsite.unc.edu/LDP/HOWTO/mini/Linux+WinNT>
  454.  
  455.   Even if they are not directly applicable to your system, they will
  456.   help you understand the issues involved.
  457.  
  458.   NOTE: Some Linuxes will install to a directory on your MS-DOS
  459.   partition. (This is different than installing FROM an MS-DOS
  460.   partition.) Instead, you use the ``UMSDOS filesystem'', which allows
  461.   you to treat a directory of your MS-DOS partition as a Linux
  462.   filesystem. In this way, you don't have to repartition your drive.
  463.  
  464.   I only suggest using this method if your drive already has four
  465.   partitions and repartitioning would be more trouble than it's worth
  466.   (it slows down your Linux due to filename translation overhead).  Or,
  467.   if you want to try out Linux before repartitioning, this is a good way
  468.   to do so. But in most cases you should repartition, as described here.
  469.   If you do plan to use UMSDOS, you are on your own---it is not
  470.   documented in detail here. From now on, we assume that you are NOT
  471.   using UMSDOS, and that you will be repartitioning.
  472.  
  473.   A partition is just a section of the hard drive set aside for a
  474.   particular operating system to use. If you only have MS-DOS installed,
  475.   your hard drive probably has just one partition, entirely for MS-DOS.
  476.   To use Linux, however, you'll need to repartition the drive, so that
  477.   you have one partition for MS-DOS, and one (or more) for Linux.
  478.  
  479.   Partitions come in three flavors: primary, extended, and logical.
  480.   Briefly, primary partitions are one of the four main partitions on
  481.   your drive. However, if you wish to have more than four partitions per
  482.   drive, you need to create an extended partition, which can contain
  483.   many logical partitions.  You don't store data directly on an extended
  484.   partition---it is used only as a container for logical partitions.
  485.   Data is stored only on either primary or logical partitions.
  486.  
  487.   To put this another way, most people use only primary partitions.
  488.   However, if you need more than four partitions on a drive, you create
  489.   an extended partition. Logical partitions are then created on top of
  490.   the extended partition, and there you have it---more than four
  491.   partitions per drive.
  492.  
  493.   Note that you can easily install Linux on the second drive on your
  494.   system (known as D: to MS-DOS). You simply specify the appropriate
  495.   device name when creating Linux partitions. This is described in
  496.   detail below.
  497.  
  498.   Back to repartitioning your drive: The problem with resizing
  499.   partitions is that there is no way to do it (easily) without deleting
  500.   the data on those partitions.  Therefore, you will need to make a full
  501.   backup of your system before repartitioning. In order to resize a
  502.   partition, we simply delete the partition(s), and re-create them with
  503.   smaller sizes.
  504.  
  505.   NOTE: There is a non-destructive disk repartitioner available for MS-
  506.   DOS, called FIPS. Look at
  507.   <http://sunsite.unc.edu/pub/Linux/system/Install>. With FIPS, a disk
  508.   optimizer (such as Norton Speed Disk), and a little bit of luck, you
  509.   should be able to resize MS-DOS partitions without destroying the data
  510.   on them.  It's still suggested that you make a full backup before
  511.   attempting this.
  512.  
  513.   If you're not using FIPS, however, the classic way to modify
  514.   partitions is with the program FDISK. For example, let's say that you
  515.   have an 80 meg hard drive, dedicated to MS-DOS. You'd like to split it
  516.   in half---40 megs for MS-DOS and 40 megs for Linux. In order to do
  517.   this, you run FDISK under MS-DOS, delete the 80 meg MS-DOS partition,
  518.   and re-create a 40 meg MS-DOS partition in its place. You can then
  519.   format the new partition and reinstall your MS-DOS software from
  520.   backups. 40 megabytes of the drive is left empty. Later, you create
  521.   Linux partitions on the unused portion of the drive.
  522.  
  523.   In short, you should do the following to resize MS-DOS partitions with
  524.   FDISK:
  525.  
  526.   1. Make a full backup of your system.
  527.  
  528.   2. Create an MS-DOS bootable floppy, using a command such as
  529.  
  530.        FORMAT /S A:
  531.  
  532.   3. Copy the files FDISK.EXE and FORMAT.COM to this floppy, as well as
  533.      any other utilities that you need. (For example, utilities to
  534.      recover your system from backup.)
  535.  
  536.   4. Boot the MS-DOS system floppy.
  537.  
  538.   5. Run FDISK, possibly specifying the drive to modify (such as C: or
  539.      D:).
  540.  
  541.   6. Use the FDISK menu options to delete the partitions which you wish
  542.      to resize. This will destroy all data on the affected partitions.
  543.  
  544.   7. Use the FDISK menu options to re-create those partitions, with
  545.      smaller sizes.
  546.  
  547.   8. Exit FDISK and re-format the new partitions with the FORMAT
  548.      command.
  549.  
  550.   9. Restore the original files from backup.
  551.  
  552.   Note that MS-DOS FDISK will give you an option to create a ``logical
  553.   DOS drive''. A logical DOS drive is just a logical partition on your
  554.   hard drive. You can install Linux on a logical partition, but you
  555.   don't want to create that logical partition with MS-DOS fdisk. So, if
  556.   you're currently using a logical DOS drive, and want to install Linux
  557.   in its place, you should delete the logical drive with MS-DOS FDISK,
  558.   and (later) create a logical partition for Linux in its place.
  559.  
  560.   The mechanism used to repartition for OS/2 and other operating systems
  561.   is similar. See the documentation for those operating systems for
  562.   details.
  563.  
  564.   5.4.  Creating partitions for Linux
  565.  
  566.   After repartitioning your drive, you need to create partitions for
  567.   Linux. Before describing how to do that, we'll talk about partitions
  568.   and filesystems under Linux.
  569.  
  570.   5.4.1.  Partition basics
  571.  
  572.   Linux requires at least one partition, for the root filesystem, which
  573.   will hold the Linux kernel and software itself.
  574.  
  575.   You can think of a filesystem as a partition formatted for Linux.
  576.   Filesystems are used to hold files. Every system must have a root
  577.   filesystem, at least. However, many users prefer to use multiple
  578.   filesystems---one for each major part of the directory tree. For
  579.   example, you may wish to create a separate filesystem to hold all
  580.   files under the /usr directory.  (Note that on UNIX systems, forward
  581.   slashes are used to delimit directories, not backslashes as with MS-
  582.   DOS.) In this case you have both a root filesystem, and a /usr
  583.   filesystem.
  584.  
  585.   Each filesystem requires its own partition. Therefore, if you're using
  586.   both root and /usr filesystems, you'll need to create two Linux
  587.   partitions.
  588.  
  589.   In addition, most users create a swap partition, which is used for
  590.   virtual RAM. If you have, say, 4 megabytes of memory on your machine,
  591.   and a 10-megabyte swap partition, as far as Linux is concerned you
  592.   have 14 megabytes of virtual memory.
  593.  
  594.   When using swap space, Linux moves unused pages of memory out to disk,
  595.   allowing you to run more applications at once on your system.
  596.   However, because swapping is often slow, it's no replacement for real
  597.   physical RAM. But applications that require a great deal of memory
  598.   (such as the X Window System) often rely on swap space if you don't
  599.   have enough physical RAM.
  600.  
  601.   Nearly all Linux users employ a swap partition.  If you have 4
  602.   megabytes of RAM or less, a swap partition is required to install the
  603.   software. It is strongly recommended that you have a swap partition
  604.   anyway, unless you have a great amount of physical RAM.
  605.  
  606.   The size of your swap partition depends on how much virtual memory you
  607.   need. It's often suggested that you have at least 16 megabytes of
  608.   virtual memory total. Therefore, if you have 8 megs of physical RAM,
  609.   you might want to create an 8-megabyte swap partition.  Note that swap
  610.   partitions can be no larger than 128 megabytes in size. Therefore, if
  611.   you need more than 128 megs of swap, you must create multiple swap
  612.   partitions. You may have up to 16 swap partitions in all.
  613.  
  614.   You can find more on the theory of swap space layout and disk
  615.   partitioning in the Linux Partition mini-HOWTO (
  616.   <http://sunsite.unc.edu/LDP/HOWTO/mini/Partition>).
  617.  
  618.   Note: it is possible, though a bit tricky, to share swap partitions
  619.   between Linux and Windows 95 in a dual-boot system.  For details, see
  620.   the Linux Swap Space Mini-HOWTO,
  621.   <http://sunsite.unc.edu/LDP/HOWTO/mini/Swap-Space>.
  622.  
  623.   Gotcha #1: If you have an EIDE drive with a partition that goes above
  624.   504MB, your BIOS may not allow you to boot to a Linux installed there.
  625.   So keep your root partition below 504MB. This shouldn't be a problem
  626.   for SCSI drive controllers, which normally have their own drive BIOS
  627.   firmware.  For technical details, see the Large Disk Mini-HOWTO,
  628.   <http://sunsite.unc.edu/LDP/HOWTO/mini/Large-Disk>.
  629.  
  630.   Gotcha #2: Are you mixing IDE and SCSI drives?  Then watch out.  Your
  631.   BIOS may not allow you to boot directly to a SCSI drive.
  632.  
  633.   5.4.2.  Sizing partitions
  634.  
  635.   Besides your root and swap partitions, you'll want to set up one or
  636.   more partitions to hold your software and home directories.
  637.  
  638.   While, in theory, you could run everything off a single huge root
  639.   partition, almost nobody does this.  Having multiple partitions has
  640.   several advantages:
  641.  
  642.   ╖  It often cuts down the time required for boot-time file-system
  643.      checks.
  644.  
  645.   ╖  Files can't grow across partition boundaries.  Therefore you can
  646.      use partition boundaries as firebreaks against programs (like
  647.      Usenet news) that want to eat huge amounts of disk, to prevent them
  648.      from crowding out file space needed by your kernel and the rest of
  649.      your applications.
  650.  
  651.   ╖  If you ever develop a bad spot on your disk, formatting and
  652.      restoring a single partition is less painful than having to redo
  653.      everything from scratch.
  654.  
  655.   On today's large disks, a good basic setup is to have a small root
  656.   partition (less than 80 meg), a medium-sized /usr partition (up to 300
  657.   meg or so) to hold system software, and a /home partition occupying
  658.   the rest of your available space for home directories.
  659.  
  660.   You can get more elaborate.  If you know you're going to run Usenet
  661.   news, for example, you may want to give it a partition of its own to
  662.   control its maximum possible disk usage.  Or create a /var partition
  663.   for mail, news, and temporary files all together.  But in today's
  664.   regime of very cheap, very large hard disks these complications seem
  665.   less and less necessary for your first Linux installation.  For your
  666.   first time, especially, keep it simple.
  667.  
  668.   5.5.  Booting the installation disk
  669.  
  670.   The first step is to boot the bootdisk you generated.  Normally you'll
  671.   be able to boot hands-off; the boot kernel prompt will fill itself in
  672.   after 10 seconds.  But by giving arguments after the kernel name, you
  673.   can specify various hardware parameters, such as your SCSI controller
  674.   IRQ and address, or drive geometry, before booting the Linux kernel.
  675.   This is necessary in case Linux does not detect your SCSI controller
  676.   or hard drive geometry, for example.
  677.  
  678.   In particular, many BIOS-less SCSI controllers require you to specify
  679.   the port address and IRQ at boot time. Likewise, IBM PS/1, ThinkPad,
  680.   and ValuePoint machines do not store drive geometry in the CMOS, and
  681.   you must specify it at boot time.  (Later on, you'll be able to
  682.   configure your production system to supply such parameters itself.)
  683.  
  684.   Watch the messages as the system boots. They will list and describe
  685.   the hardware your installation Linux detects.  In particular, f you
  686.   have a SCSI controller, you should see a listing of the SCSI hosts
  687.   detected.  If you see the message
  688.  
  689.        SCSI: 0 hosts
  690.  
  691.   Then your SCSI controller was not detected, and you will have to
  692.   figure out how to tell the kernel where it is.
  693.  
  694.   Also, the system will display information on the drive partitions and
  695.   devices detected. If any of this information is incorrect or missing,
  696.   you will have to force hardware detection.
  697.  
  698.   On the other hand, if all goes well and you hardware seems to be
  699.   detected, you can skip to the following section, ``Loading the root
  700.   disk.''
  701.  
  702.   To force hardware detection, you must enter the appropriate parameters
  703.   at the boot prompt, using the following syntax:
  704.  
  705.        linux <parameters...>
  706.  
  707.   There are a number of such parameters available; we list some of the
  708.   most common below.  Modern Linux boot disks will often give you the
  709.   option to look at help screen describing kernel parameters before you
  710.   boot.
  711.  
  712.   ╖  hd=cylinders,heads,sectors Specify the drive geometry.  Required
  713.      for systems such as the IBM PS/1, ValuePoint, and ThinkPad.  For
  714.      example, if your drive has 683 cylinders, 16 heads, and 32 sectors
  715.      per track, enter
  716.  
  717.        linux hd=683,16,32
  718.  
  719.   ╖  tmc8xx=memaddr,irq Specify address and IRQ for BIOS-less Future
  720.      Domain TMC-8xx SCSI controller. For example,
  721.  
  722.        linux tmc8xx=0xca000,5
  723.  
  724.   Note that the 0x prefix must be used for all values given in hex. This
  725.   is true for all of the following options.
  726.  
  727.   ╖  st0x=memaddr,irq Specify address and IRQ for BIOS-less Seagate ST02
  728.      controller.
  729.   ╖  t128=memaddr,irq Specify address and IRQ for BIOS-less Trantor
  730.      T128B controller.
  731.  
  732.   ╖  ncr5380=port,irq,dma Specify port, IRQ, and DMA channel for generic
  733.      NCR5380 controller.
  734.  
  735.   ╖  aha152x=port,irq,scsi_id,1 Specify port, IRQ, and SCSI ID for BIOS-
  736.      less AIC-6260 controllers. This includes Adaptec 1510, 152x, and
  737.      Soundblaster-SCSI controllers.
  738.  
  739.   If you have questions about these boot-time options, please read the
  740.   Linux SCSI HOWTO, which should be available on any Linux FTP archive
  741.   site (or from wherever you obtained this document).  The SCSI HOWTO
  742.   explains Linux SCSI compatibility in much more detail.
  743.  
  744.   5.6.  Using the rootdisk
  745.  
  746.   After booting the bootdisk, you will be prompted to enter the root
  747.   disk or disks.  At this point you should remove the bootdisk from the
  748.   drive and insert the rootdisk. Then press enter to go on.  You may
  749.   have to load a second root disk.
  750.  
  751.   What's actually happening here is this: the boot disk provides a
  752.   miniature operating system which (because the hard drive isn't
  753.   prepared) uses a portion of your RAM as a virtual disk (called,
  754.   logically enough, a `ramdisk').
  755.  
  756.   The root disks loads onto the ramdisk a small set of files and
  757.   installation tools which you'll use to prepare your hard drive and
  758.   install a production Linux on it from your CD-ROM.
  759.  
  760.   5.6.1.  Choosing EGA or X installation
  761.  
  762.   Older Linuxes (including Slackware) gave you a shell at this point and
  763.   required you to enter installation commands by hand in a a prescribed
  764.   sequence.  This is still possible, but newer ones start by running a
  765.   screen-oriented installation program which tries to interactively walk
  766.   you through these steps, giving lots of help.
  767.  
  768.   You will probably get the option to try to configure X right away so
  769.   the installation program can go graphical.  If you choose this route,
  770.   the installation program will quiz you about your mouse and monitor
  771.   type before getting to the installation proper.  Once you get your
  772.   production Linux installed, these settings will be saved for you.  You
  773.   will be able to tune your monitor's performance later, so at this
  774.   stage it makes sense to settle for a basic 640x480 SVGA mode.
  775.  
  776.   X isn't necessary for installation, but (assuming you can get past the
  777.   mouse and monitor configuration) many people find the graphical
  778.   interface easier to use.  And you're going to want to bring up X
  779.   anyway, so trying it early makes some sense.
  780.  
  781.   Just follow the prompts in the program.  It will take you through the
  782.   steps necessary to prepare your disk, create initial user accounts,
  783.   and install software packages off the CD-ROM.
  784.  
  785.   In the following subsections we'll describe some of the tricky areas
  786.   in the installation sequence as if you were doing them by hand.  This
  787.   should help you understand what the installation program is doing, and
  788.   why.
  789.  
  790.   5.6.2.  Using fdisk and cfdisk
  791.  
  792.   Your first installation step once the root-disk Linux is booted will
  793.   be to create or edit the partition tables on your disks.  Even if you
  794.   used FDISK to set up partitions earlier, you'll need to go back to the
  795.   partition table now and insert some Linux-specific information now.
  796.  
  797.   To create or edit Linux partitions, we'll use the Linux version of the
  798.   fdisk program, or its screen-oriented sibling cfdisk.
  799.  
  800.   Generally the installation program will look for a preexisting
  801.   partition table and offer to run fdisk or cfdisk on it for you.  Of
  802.   the two, cfdisk is definitely easier to use, but current versions of
  803.   it are also less tolerant of a nonexistent or garbled partition table.
  804.  
  805.   Therefore you may find (especially if you're installing on virgin
  806.   hardware) that you need to start with fdisk to get to a state that
  807.   cfdisk can deal with.  Try running cfdisk; if it complains, run fdisk.
  808.   (A good way to proceed if you're building an all-Linux system and
  809.   cfdisk complains is to use fdisk to delete all the existing partions
  810.   and then fire up cfdisk to edit the empty table.)
  811.  
  812.   A few notes apply to both fdisk and cfdisk.  Both take an argument
  813.   which is the name of the drive that you wish to create Linux
  814.   partitions on. Hard drive device names are:
  815.  
  816.   ╖  /dev/hda First IDE drive
  817.  
  818.   ╖  /dev/hdb Second IDE drive
  819.  
  820.   ╖  /dev/sda First SCSI drive
  821.  
  822.   ╖  /dev/sdb Second SCSI drive
  823.  
  824.   For example, to create Linux partitions on the first SCSI drive in
  825.   your system, you will use (or your installation program might generate
  826.   from a menu choice) the command:
  827.  
  828.        cfdisk /dev/sda
  829.  
  830.   If you use fdisk or cfdisk without an argument, it will assume
  831.   /dev/hda.
  832.  
  833.   To create Linux partitions on the second drive on your system, simply
  834.   specify either /dev/hdb (for IDE drives) or /dev/sdb (for SCSI drives)
  835.   when running fdisk.
  836.  
  837.   Your Linux partitions don't all have to be on the same drive.  You
  838.   might want to create your root filesystem partition on /dev/hda and
  839.   your swap partition on /dev/hdb, for example. In order to do so just
  840.   run fdisk or cfdisk once for each drive.
  841.  
  842.   In Linux, partitions are given a name based on the drive which they
  843.   belong to. For example, the first partition on the drive /dev/hda is
  844.   /dev/hda1, the second is /dev/hda2, and so on. If you have any logical
  845.   partitions, they are numbered starting with /dev/hda5, /dev/hda6 and
  846.   so on up.
  847.  
  848.   NOTE: You should not create or delete partitions for operating systems
  849.   other than Linux with Linux fdisk or cfdisk. That is, don't create or
  850.   delete MS-DOS partitions with this version of fdisk; use MS-DOS's
  851.   version of FDISK instead. If you try to create MS-DOS partitions with
  852.   Linux fdisk, chances are MS-DOS will not recognize the partition and
  853.   not boot correctly.
  854.  
  855.   Here's an example of using fdisk. Here, we have a single MS-DOS
  856.   partition using 61693 blocks on the drive, and the rest of the drive
  857.   is free for Linux. (Under Linux, one block is 1024 bytes. Therefore,
  858.   61693 blocks is about 61 megabytes.)  We will create just two
  859.   partitions in this tutorial example, swap and root.  You should
  860.   probably extend this to four Linux partitions in line with the
  861.   recommendations above: one for swap, one for the root filesystem, one
  862.   for system software, and a home directory area.
  863.  
  864.   First, we use the ``p'' command to display the current partition
  865.   table.  As you can see, /dev/hda1 (the first partition on /dev/hda) is
  866.   a DOS partition of 61693 blocks.
  867.  
  868.        Command (m for help):   p
  869.        Disk /dev/hda: 16 heads, 38 sectors, 683 cylinders
  870.        Units = cylinders of 608 * 512 bytes
  871.  
  872.             Device Boot  Begin   Start     End  Blocks   Id  System
  873.          /dev/hda1   *       1       1     203   61693    6  DOS 16-bit >=32M
  874.  
  875.        Command (m for help):
  876.  
  877.   Next, we use the ``n'' command to create a new partition. The Linux
  878.   root partition will be 80 megs in size.
  879.  
  880.        Command (m for help):  n
  881.        Command action
  882.            e   extended
  883.            p   primary partition (1-4)
  884.        p
  885.  
  886.   Here we're being asked if we want to create an extended or primary
  887.   partition. In most cases you want to use primary partitions, unless
  888.   you need more than four partitions on a drive. See the section
  889.   ``Repartitioning'', above, for more information.
  890.  
  891.        Partition number (1-4): 2
  892.        First cylinder (204-683):  204
  893.        Last cylinder or +size or +sizeM or +sizeK (204-683): +80M
  894.  
  895.   The first cylinder should be the cylinder AFTER where the last
  896.   partition left off. In this case, /dev/hda1 ended on cylinder 203, so
  897.   we start the new partition at cylinder 204.
  898.  
  899.   As you can see, if we use the notation ``+80M'', it specifies a
  900.   partition of 80 megs in size. Likewise, the notation ``+80K'' would
  901.   specify an 80 kilobyte partition, and ``+80'' would specify just an 80
  902.   byte partition.
  903.  
  904.        Warning: Linux cannot currently use 33090 sectors of this partition
  905.  
  906.   If you see this warning, you can ignore it. It is left over from an
  907.   old restriction that Linux filesystems could only be 64 megs in size.
  908.   However, with newer filesystem types, that is no longer the case...
  909.   partitions can now be up to 4 terabytes in size.
  910.  
  911.   Next, we create our 10 megabyte swap partition, /dev/hda3.
  912.  
  913.        Command (m for help): n
  914.        Command action
  915.            e   extended
  916.            p   primary partition (1-4)
  917.        p
  918.  
  919.        Partition number (1-4): 3
  920.        First cylinder (474-683):  474
  921.        Last cylinder or +size or +sizeM or +sizeK (474-683):  +10M
  922.  
  923.   Again, we display the contents of the partition table. Be sure to
  924.   write down the information here, especially the size of each partition
  925.   in blocks. You need this information later.
  926.  
  927.        Command (m for help): p
  928.        Disk /dev/hda: 16 heads, 38 sectors, 683 cylinders
  929.        Units = cylinders of 608 * 512 bytes
  930.  
  931.             Device Boot  Begin   Start     End  Blocks   Id  System
  932.          /dev/hda1   *       1       1     203   61693    6  DOS 16-bit >=32M
  933.          /dev/hda2         204     204     473   82080   83  Linux native
  934.          /dev/hda3         474     474     507   10336   83  Linux native
  935.  
  936.   Note that the Linux swap partition (here, /dev/hda3) has type ``Linux
  937.   native''. We need to change the type of the swap partition to ``Linux
  938.   swap'' so that the installation program will recognize it as such. In
  939.   order to do this, use the fdisk ``t'' command:
  940.  
  941.        Command (m for help): t
  942.        Partition number (1-4): 3
  943.        Hex code (type L to list codes): 82
  944.  
  945.   If you use ``L'' to list the type codes, you'll find that 82 is the
  946.   type corresponding to Linux swap.
  947.  
  948.   To quit fdisk and save the changes to the partition table, use the
  949.   ``w'' command. To quit fdisk WITHOUT saving changes, use the ``q''
  950.   command.
  951.  
  952.   After quitting fdisk, the system may tell you to reboot to make sure
  953.   that the changes took effect. In general there is no reason to reboot
  954.   after using fdisk---modern versions of fdisk and cfdisk are smart
  955.   enough to update the partitions without rebooting.
  956.  
  957.   5.6.3.  Post-partition steps
  958.  
  959.   After you've edited the partition tables, your installation program
  960.   should look at them and offer to enable your swap partition for you.
  961.   Tell it yes.
  962.  
  963.   (This is made a question, rather than done automatically, on the off
  964.   chance that you're running a dual-boot system and one of your non-
  965.   Linux partitions might happen to look like a swap volume.)
  966.  
  967.   Next the program will ask you to associate Linux filesystem names
  968.   (such as /, /usr, /var, /tmp, /home, /home2, etc.) with each of the
  969.   non-swap partitions you're going to use.
  970.  
  971.   There is only one hard and fast rule for this.  There must be a root
  972.   filesystem, named /, and it must be bootable.  You can name your other
  973.   Linux partitions anything you like.  But there are some conventions
  974.   about how to name them which will probably simplify your life later
  975.   on.
  976.  
  977.   Earlier on I recommended a basic three-partition setup including a
  978.   small root, a medium-sized system-software partition, and a large
  979.   home-directory partition.  Traditionally, these would be called /,
  980.   /usr, and /home.  The counterintuitive `/usr' name is a historical
  981.   carryover from the days when (much smaller) Unix systems carried
  982.   system software and user home directories on a single non-root
  983.   partition.  Some software depends on it.
  984.  
  985.   If you have more than one home-directory area, it's conventional to
  986.   name them /home, /home2, /home3, etc.  This may come up if you have
  987.   two physical disks.  On my personal system, for example, the layout
  988.   currently looks like this:
  989.  
  990.        Filesystem         1024-blocks  Used Available Capacity Mounted on
  991.        /dev/sda1              30719   22337     6796     77%   /
  992.        /dev/sda3             595663  327608   237284     58%   /usr
  993.        /dev/sda4            1371370    1174  1299336      0%   /home
  994.        /dev/sdb1            1000949  643108   306130     68%   /home2
  995.  
  996.   The second disk (sdb1) isn't really all /home2; the swap partitions on
  997.   sda and sdb aren't shown in this display.  But you can see that /home
  998.   is the large free area on sda and /home2 is the user area of sdb.
  999.  
  1000.   If you want to create an partition for scratch, spool, temporary,
  1001.   mail, and news files, call it /var.  Otherwise you'll probably want to
  1002.   create a /usr/var and create a symbolic link named /var that points
  1003.   back to it (the installation program may offer to do this for you).
  1004.  
  1005.   5.7.  Installing software packages
  1006.  
  1007.   Once you've gotten past preparing your partitions, the remainder of
  1008.   the installation should be almost automatic.  Your installation
  1009.   program (whether EGA or X-based) will guide you through a series of
  1010.   menus which allow you to specify the CD-ROM to install from, the
  1011.   partitions to use, and so forth.
  1012.  
  1013.   Here we're not going to document many of the specifics of this stage
  1014.   of installation.  It's one of the parts that varies most between Linux
  1015.   distributions (vendors traditionally compete to add value here), but
  1016.   also the simplest part.  And the installation programs are pretty much
  1017.   self-explanatory, with good on-screen help.
  1018.  
  1019.   5.8.  After package installations
  1020.  
  1021.   After installation is complete, and if all goes well, the installation
  1022.   program will walk you through a few options for configuring your
  1023.   system before its first boot from hard drive.
  1024.  
  1025.   5.8.1.  LILO, the LInux LOader
  1026.  
  1027.   LILO (which stands for LInux LOader) is a program that will allow you
  1028.   to boot Linux (as well as other operating systems, such as MS-DOS)
  1029.   from your hard drive.
  1030.  
  1031.   You may be given the option of installing LILO on your hard drive.
  1032.   Unless you're running OS/2, answer `yes'.  OS/2 has special
  1033.   requirements; see ``Custom LILO  Configuration'' below.
  1034.  
  1035.   Installing LILO as your primary loader makes a separate boot diskette
  1036.   unnecessary; instead, you can tell LILO at each boot time which OS to
  1037.   boot.
  1038.  
  1039.   5.8.2.  Making a production boot disk (optional)
  1040.  
  1041.   You may also be given the chance to create a ``standard boot disk'',
  1042.   which you can use to boot your newly-installed Linux system.  (This is
  1043.   an older and slightly less convenient method which assumes that you
  1044.   will normally boot DOS, but use the boot disk to start Linux.)
  1045.  
  1046.   For this you will need a blank, high-density MS-DOS formatted diskette
  1047.   of the type that you boot with on your system. Simply insert the disk
  1048.   when prompted and a boot diskette will be created.  (This is not the
  1049.   same as an installation bootdisk, and you can't substitute one for the
  1050.   other!)
  1051.  
  1052.   5.8.3.  Miscellaneous system configuration
  1053.  
  1054.   The post-installation procedure may also take you through several menu
  1055.   items allowing you to configure your system. This includes specifying
  1056.   your modem and mouse device, as well as your time zone.  Follow the
  1057.   menu options.
  1058.  
  1059.   It may also prompt you to create user accounts or put a password on
  1060.   the root (administration) account.  This is not complicated and you
  1061.   can usually just walk through the screen instructions.
  1062.  
  1063.   6.  Booting Your New System
  1064.  
  1065.   If everything went as planned, you should now be able to boot Linux
  1066.   from the hard drive using LILO.  Alternatively, you should be able to
  1067.   boot your Linux boot floppy (not the original bootdisk floppy, but the
  1068.   floppy created after installing the software).  After booting, login
  1069.   as root. Congratulations! You have your very own Linux system.
  1070.  
  1071.   If you are booting using LILO, try holding down shift or control
  1072.   during boot. This will present you with a boot prompt; press tab to
  1073.   see a list of options. In this way you can boot Linux, MS-DOS, or
  1074.   whatever directly from LILO.
  1075.  
  1076.   7.  After Your First Boot
  1077.  
  1078.   You should now be looking at the login prompt of a new Linux, just
  1079.   booted from your hard drive.  Congratulations!
  1080.  
  1081.   7.1.  Beginning System Administratration
  1082.  
  1083.   Depending on how the installation phase went, you may need to create
  1084.   accounts, change your hostname, or (re)configure X at this stage.
  1085.   There are many more things you could set up and configure, including
  1086.   backup devices, SLIP/PPP links to an Internet Service Provider, etc.
  1087.  
  1088.   A good book on UNIX systems administration should help. (I suggest
  1089.   Essential Systems Administration from O'Reilly and Associates.)  You
  1090.   will pick these things up as time goes by. You should read various
  1091.   other Linux HOWTOs, such as the NET-2-HOWTO and Printing-HOWTO, for
  1092.   information on other configuration tasks.
  1093.  
  1094.   7.2.  Custom LILO Configuration
  1095.  
  1096.   LILO is a boot loader, which can be used to select either Linux, MS-
  1097.   DOS, or some other operating system at boot time.  Chances are your
  1098.   distribution automatically configured LILO for you during the
  1099.   installation phase (unless you're using OS/2, this is what you should
  1100.   have done).  If so, you can skip the rest of this section.
  1101.  
  1102.   If you installed LILO as the primary boot loader, it will handle the
  1103.   first-stage booting process for all operating systems on your drive.
  1104.   This works well if MS-DOS is the only other operating system that you
  1105.   have installed. However, you might be running OS/2, which has its own
  1106.   Boot Manager. In this case, you want OS/2's Boot Manager to be the
  1107.   primary boot loader, and use LILO just to boot Linux (as the secondary
  1108.   boot loader).
  1109.  
  1110.   An important gotcha for people using EIDE systems: due to a BIOS
  1111.   limitation, your boot sectors for any OS have to live on one of the
  1112.   first two physical disks.  Otherwise LILO will hang after writing
  1113.   "LI", no matter where you run it from.
  1114.  
  1115.   If you have to configure LILO manually, this will involve editing the
  1116.   file /etc/lilo.conf. Below we present an example of a LILO
  1117.   configuration file, where the Linux root partition is on /dev/hda2,
  1118.   and MS-DOS is installed on /dev/hdb1 (on the second hard drive).
  1119.  
  1120.   # Tell LILO to install itself as the primary boot loader on /dev/hda.
  1121.   boot = /dev/hda
  1122.   # The boot image to install; you probably shouldn't change this
  1123.   install = /boot/boot.b
  1124.  
  1125.   # The stanza for booting Linux.
  1126.   image = /vmlinuz       # The kernel is in /vmlinuz
  1127.     label = linux        # Give it the name "linux"
  1128.     root = /dev/hda2     # Use /dev/hda2 as the root filesystem
  1129.     vga = ask            # Prompt for VGA mode
  1130.     append = "aha152x=0x340,11,7,1"  # Add this to the boot options,
  1131.                                      # for detecting the SCSI controller
  1132.  
  1133.   # The stanza for booting MS-DOS
  1134.   other = /dev/hdb1      # This is the MS-DOS partition
  1135.     label = msdos        # Give it the name "msdos"
  1136.     table = /dev/hdb     # The partition table for the second drive
  1137.  
  1138.   Once you have edited the /etc/lilo.conf file, run /sbin/lilo as root.
  1139.   This will install LILO on your drive. Note that you must rerun
  1140.   /sbin/lilo anytime that you recompile your kernel in order to point
  1141.   the boot loader at it properly (something that you don't need to worry
  1142.   about just now, but keep it in mind).
  1143.  
  1144.   Note how we use the append option in /etc/lilo.conf to specify boot
  1145.   parameters as we did when booting the bootdisk.
  1146.  
  1147.   You can now reboot your system from the hard drive. By default LILO
  1148.   will boot the operating system listed first in the configuration file,
  1149.   which in this case is Linux. In order to bring up a boot menu, in
  1150.   order to select another operating system, hold down shift or ctrl
  1151.   while the system boots; you should see a prompt such as
  1152.  
  1153.        Boot:
  1154.  
  1155.   Here, enter either the name of the operating system to boot (given by
  1156.   the label line in the configuration file; in this case, either linux
  1157.   or msdos), or press tab to get a list.
  1158.  
  1159.   Now let's say that you want to use LILO as the secondary boot loader;
  1160.   if you want to boot Linux from OS/2's Boot Manager, for example.  In
  1161.   order to boot a Linux partition from OS/2 Boot Manager, unfortunately,
  1162.   you must create the partition using OS/2's FDISK (not Linux's), and
  1163.   format the partition as FAT or HPFS, so that OS/2 knows about it.
  1164.   (That's IBM for you.)
  1165.  
  1166.   In order to have LILO boot Linux from OS/2 Boot Manager, you only want
  1167.   to install LILO on your Linux root filesystem (in the above example,
  1168.   /dev/hda2). In this case, your LILO config file should look something
  1169.   like:
  1170.  
  1171.        boot = /dev/hda2
  1172.        install = /boot/boot.b
  1173.        compact
  1174.  
  1175.        image = /vmlinuz
  1176.          label = linux
  1177.          root = /dev/hda2
  1178.          vga = ask
  1179.  
  1180.   Note the change in the boot line. After running /sbin/lilo you should
  1181.   be able to add the Linux partition to Boot Manager. This mechanism
  1182.   should work for boot loaders used by other operating systems as well.
  1183.  
  1184.   8.  Administrivia
  1185.  
  1186.   8.1.  Terms of Use
  1187.  
  1188.   This document is copyright 1996 by Eric S. Raymond. You may use,
  1189.   disseminate, and reproduce it freely, provided you:
  1190.  
  1191.   ╖  Do not omit or alter this copyright notice.
  1192.  
  1193.   ╖  Do not omit or alter or omit the version number and date.
  1194.  
  1195.   ╖  Do not omit or alter the document's pointer to the current WWW
  1196.      version.
  1197.  
  1198.   ╖  Clearly mark any condensed, altered or versions as such.
  1199.  
  1200.   These restrictions are intended to protect potential readers from
  1201.   stale or mangled versions.  If you think you have a good case for an
  1202.   exception, ask me.
  1203.  
  1204.   8.2.  Acknowledgements
  1205.  
  1206.   My grateful acknowledgement to Matt D. Welsh, who originated this
  1207.   HOWTO.  I removed much of the Slackware-specific content and refocused
  1208.   the remainder of the document on CD-ROM installation, but a
  1209.   substantial part of the content is still his.
  1210.  
  1211.   The 4.1 version was substantially improved by some suggestions from
  1212.   David Shao <dshao@best.com>.
  1213.  
  1214.